Two Laptop Bag*
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

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
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: 37936
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: 37936
But that Contact class actually looks like object-oriented programming
Consider Paul's rocket mass heater.
subject: Address Book Java Issues
Similar Threads
Serching for a surname in my collection
Cell Widget Table in GWT 2.1.0 with expanded/collapsed rows
Advice on managing objects in requests
Project Help
Project Help