Question: ( 6 . 5 points ) Suppose that s 1 , s 2 , and s 3 are three strings, given as follows: String s

(6.5 points) Suppose that s1, s2, and s3 are three strings, given as follows: String s1= "Welcome to Java"; String s2= "Programming is fun"; String s3= "Welcome to Java"; What are the results of the following expressions? a. s1== s2 b. s1== s3 c. s1.equals(s2) d. s1.equals(s3) e. s1.compareTo(s2) f. s2.compareTo(s3) g. s2.compareTo(s2) h. s1.charAt(0) i. s1.indexOf('j') j. s1.length() k. s1.substring(5) l. s1.toLowerCase() m. s1.toUpperCase()

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