Advertisements
Advertisements
Question
Write the output of the codes given below.
String s1 = "RISTORANT"; String s2 = “VENEZUELA";
char c1 = s2.charAt(s1.indexOf('T')); int n1 = s1.indexOf(s2.charAt(8));
System.out.print(" c1 =" +c1+ " and n1 ="+n1);Very Short Answer
Advertisements
Solution
c1 = E and n1 = 6
shaalaa.com
Is there an error in this question or solution?
