Question: Consider two String objects namely s1 and s2, and they are referenced by stringOne and stringONE respectively. Write the corresponding string methods that can

Consider two String objects namely s1 and s2, and they are referenced

Consider two String objects namely s1 and s2, and they are referenced by stringOne and stringONE respectively. Write the corresponding string methods that can compare two strings s1 and s2. One comparison method should be case sensitive and other method should be ignoring case. Also write the possible output of each comparison method. Blank # 1 Blank # 2 N A

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Solution for the above question is compareTo method This method will compare each and every correspo... View full answer

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 Programming Questions!