JAVA Strings What will be the output?String str1 = "abcde";System.out.println(str1.substring(1, 3)); bc None of these abcd abc bcd bc None of these abcd abc bcd ANSWER DOWNLOAD EXAMIANS APP
JAVA Strings The String method compareTo() returns an int value -1 true false 1 an int value -1 true false 1 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 None of these Compilation error Throws an exception Hello Hellow None of these Compilation error Throws an exception Hello ANSWER DOWNLOAD EXAMIANS APP
JAVA Strings What will be the output of the following program code?public class Test{ public static void main(String args[]){ String s = "what"; StringBuffer sb = new StringBuffer("what"); System.out.print(sb.equals(s)+","+s.equals(sb)); }} false,true None of these false,false true,false true,true false,true None of these false,false true,false true,true ANSWER DOWNLOAD EXAMIANS APP
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)); }} false Throws Exception 0 true Compilation error false Throws Exception 0 true Compilation error ANSWER DOWNLOAD EXAMIANS APP
JAVA Strings How many Constructor String class have? 2 None of this 13 7 11 2 None of this 13 7 11 ANSWER DOWNLOAD EXAMIANS APP