File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Beginning Java and the fly likes Address Book Java Issues Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Address Book Java Issues" Watch "Address Book Java Issues" New topic

Address Book Java Issues

Philip Stone

Joined: Aug 18, 2011
Posts: 19
Well I've sorted my AddressBook Class out for the time being .. i think

Working on the View Entries in my text ui

This is my AddressBook Class now:

And inside my TextBookUi Class

When i compile however it says that it cannot find the variable name and i presume address as well.
I believe its looking in the correct place my contact class

Campbell Ritchie

Joined: Oct 13, 2005
Posts: 46393
Since Contact extends java.lang.Object, you may find super.toString() gives you something you don't actually want. I have already told you there is a much neater way to deal with null values in your equals() method.
Beware of returning null anywhere. Actually you might get null even if you don't have that test in the method, because values where n ≥ top ought to be null anyway.
Campbell Ritchie

Joined: Oct 13, 2005
Posts: 46393
But that Contact class actually looks like object-oriented programming
I agree. Here's the link:
subject: Address Book Java Issues
It's not a secret anymore!