JAVA Strings Determine output:public class Test{ public static void main(String args[]){ String s1 = "SITHA";String s2 = "RAMA";System.out.println(s1.charAt(0) > s2.charAt(0)); }} 0 Throws Exception true Compilation error false 0 Throws Exception true Compilation error false ANSWER DOWNLOAD EXAMIANS APP
JAVA Strings What is the output of the following println statement?String str1 = "Hellow";System.out.println(str1.indexOf('t')); 0 true 1 -1 false 0 true 1 -1 false ANSWER DOWNLOAD EXAMIANS APP
JAVA Strings toString() method is defined in java.lang.Object None of these java.lang.util java.lang.String java.lang.Object None of these java.lang.util java.lang.String ANSWER DOWNLOAD EXAMIANS APP
JAVA Strings The class string belongs to ................. package. java.awt java.string java.lang java.applet java.awt java.string java.lang java.applet ANSWER DOWNLOAD EXAMIANS APP
JAVA Strings The output of the following fraction of code ispublic class Test{ public static void main(String args[]){ String s1 = new String("Hello");String s2 = new String("Hellow");System.out.println(s1 = s2);}} Hellow Compilation error Throws an exception Hello None of these Hellow Compilation error Throws an exception Hello None of these ANSWER DOWNLOAD EXAMIANS APP
JAVA Strings What could be output of the following fragment of code?public class Test{ public static void main(String args[]){ String x = "hellow";int y = 9;System.out.println(x += y); } } hellow9 Throws an exception as string and int are not compatible for addition Compilation error None of these 9hellow hellow9 Throws an exception as string and int are not compatible for addition Compilation error None of these 9hellow ANSWER DOWNLOAD EXAMIANS APP