Question: JAVA: Can you help me fix this part program? NOT implement this method by converting the Name object to string (using to String()) and then

 JAVA: Can you help me fix this part program? NOT implementthis method by converting the Name object to string (using to String())

JAVA: Can you help me fix this part program?

NOT implement this method by converting the Name object to string (using to String()) and then using the String class compare To method on the resulting strings. public int compareTo (Name n ) \{ if(lastName.compareTo(n.getLastname ()) =0){ return lastName. compareTo(n.getLastname ()); \} if(firstName.compareTo(n.getFirstname ()) !=0){ return firstName.compareTo(n.getFirstname ()); \} if(middleName.compareTo(n.getMiddlename ()) =0){ return middleName.compareTo(n.getMiddlename ()); \} return 0; \}

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!