// Step 4
If (firstPersonName[0].length > secondPersonName[0].length) {

This part is not correct since firstPersonName[0] is a String and to
get a length of string, you have to call a method - firstPersonName
[0].length(). So initial example is more correct than replied
regarding length call. But there is a cardinal mistake in first
example - lengths are calculated BEFORE names are read - this will
give you false results based on initial values of person1NameInstance
and person2NameInstance.

Also, message in else part is not quite correct if persons have a name
of equal length ;-)
-- 
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/javaprogrammingwithpassion?hl=en

Reply via email to