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)); }} Throws Exception Compilation error 0 false true Throws Exception Compilation error 0 false true ANSWER DOWNLOAD EXAMIANS APP
JAVA Strings The class string belongs to ................. package. java.string java.applet java.lang java.awt java.string java.applet java.lang java.awt 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); } } 9hellow Throws an exception as string and int are not compatible for addition hellow9 None of these Compilation error 9hellow Throws an exception as string and int are not compatible for addition hellow9 None of these Compilation error ANSWER DOWNLOAD EXAMIANS APP
JAVA Strings What will be the output?public class Test{ public static void main (String[] args){ String test = "a1b2c3"; String[] tokens = test.split("\\d"); for(String s: tokens) System.out.print(s); } } abc Runtime exception thrown 123 Compilation error abc Runtime exception thrown 123 Compilation error ANSWER DOWNLOAD EXAMIANS APP
JAVA Strings toString() method is defined in java.lang.Object None of these java.lang.String java.lang.util java.lang.Object None of these java.lang.String java.lang.util 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);}} None of these Hellow Compilation error Throws an exception Hello None of these Hellow Compilation error Throws an exception Hello ANSWER DOWNLOAD EXAMIANS APP