This week's book giveaway is in the OCP forum.
We're giving away four copies of OCP Java SE 8 Programmer II Exam Study Guide and have Kathy Sierra, Bert Bates, & Elizabeth Robson on-line!
See this thread for details.
Win a copy of OCP Java SE 8 Programmer II Exam Study Guide this week in the OCP forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

ArrayList Value  RSS feed

 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm almost done with this. Now, when I choose to display the contacts, I'm getting . I believe it's picking the right contact, just not showing me what I want to see. I'm guessing there's some method or something small that I'm missing. Any help would be appreciated.

Main:


Contacts class:


Personal Contacts Class:


Business Contacts class:
 
author & internet detective
Sheriff
Posts: 38027
605
Eclipse IDE Java VI Editor
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jayden,
If you implement the toString() method in the Contacts class, it will output human readable information. For example:

 
Jayden Brymatt
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That was a heck of a lot easier than what I was trying to do. Thanks so much for helping out!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!