Question: QUESTION 1 What is output by the following code? String s 1 = new String ( z ) ; String s 2 =

QUESTION 1 What is output by the following code? String s1= new String("z"); String s2= new String("z"); boolean b1=(s1== s2); boolean b2=(s1.equals(s2)); System.out.print(b1+""+ b2); QUESTION 2 What is output by the following code? String so = "Java": char c1= s0.charAt(1); char c2=50.charAt(3); boolean b1=(c1== c2); System.out.print(b1+""+ c1+ c2); QUESTION 3 What is output by the following code? String s0= "Java": int i =0.indexOf('a'); int 12=50.indexOf('a',11); int i3= s0.indexOf('a', i1+1); System.out.print(11+""+12+""+13); QUESTION 4 What is output by the following code? String s1= "Java"; String s2= "java": boolean b1=(s1.compare To(s2)<0); boolean b2=(s2.compare To(s1)<0); System.out.print(b1+"*+ b2); QUESTION 5 What is output by the following code? String st = "Java"; String s2="; for (int i = s1.length()-1; i >=0; i--){ S2+= $1.charAt(i); System.out.print(s2); QUESTION 6 What is output by the following code? String s1= "Java"; String s2=""; for (int i =0; i

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!