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)); }} None of these false,true false,false true,true true,false None of these false,true false,false true,true true,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')); -1 0 false true 1 -1 0 false true 1 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); } } 123 abc Compilation error Runtime exception thrown 123 abc Compilation error Runtime exception thrown ANSWER DOWNLOAD EXAMIANS APP
JAVA Strings How many Constructor String class have? 13 None of this 7 11 2 13 None of this 7 11 2 ANSWER DOWNLOAD EXAMIANS APP
JAVA Strings toString() method is defined in java.lang.Object java.lang.String java.lang.util None of these java.lang.Object java.lang.String java.lang.util None of these ANSWER DOWNLOAD EXAMIANS APP
JAVA Strings What will be the output of the following program code?class LogicalCompare{ public static void main(String args[]){ String str1 = new String("OKAY"); String str2 = new String(str1); System.out.println(str1 == str2); }} 0 1 false Displays error message true 0 1 false Displays error message true ANSWER DOWNLOAD EXAMIANS APP