my dog learned polymorphism
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes find method in Data class Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "find method in Data class" Watch "find method in Data class" New topic

find method in Data class

Miguel Roque
Ranch Hand

Joined: Oct 24, 2002
Posts: 126
I've been working in the reservation part of the assignment and i've seen what could be a bug in the data class. The method find in this class compares the first value using the equals (what is right), but in my case, i've created new records that i've added to the database and some of them in the first field doesn't have 5 digits as in the original database. Like this, the method find doesn't work.
I've changed the line

to be

Has anyone done this? Is it realy necessary? Well, we can allways argue this in the design choices file !
HS Thomas
Ranch Hand

Joined: May 15, 2002
Posts: 3404
Hi Miguel,
I guess most people (as I have ) would just trim the values on the presentation of the data on the GUI i.e on the View
as well as on any equality checks between the View and the Model.
I think that's right. As far as Internationalisation goes, I should think trailing spaces meaning nothing is pretty Universal.
I agree. Here's the link:
subject: find method in Data class
It's not a secret anymore!