Question: If String myFriend = new String(Ginny);, which of the following has the value 1? a. myFriend.compareTo(Gabby); b. myFriend.compareTo(Gabriella); c. myFriend.compareTo(Ghazala); d. myFriend.compareTo(Hammie);
If String myFriend = new String("Ginny");, which of the following has the value 1?
a. myFriend.compareTo("Gabby");
b. myFriend.compareTo("Gabriella");
c. myFriend.compareTo("Ghazala");
d. myFriend.compareTo("Hammie");
Step by Step Solution
3.34 Rating (160 Votes )
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
