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)); }} true,false false,true false,false None of these true,true true,false false,true false,false None of these true,true 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); }} false true 0 Displays error message 1 false true 0 Displays error message 1 ANSWER DOWNLOAD EXAMIANS APP
JAVA Strings What will be the output of the following program?public class Test{ public static void main(String args[]){String str1 = "one";String str2 = "two";System.out.println(str1.concat(str2)); }} twoone onetwo two None of these one twoone onetwo two None of these one ANSWER DOWNLOAD EXAMIANS APP
JAVA Strings The String method compareTo() returns true an int value false 1 -1 true an int value false 1 -1 ANSWER DOWNLOAD EXAMIANS APP
JAVA Strings The class string belongs to ................. package. java.lang java.awt java.applet java.string java.lang java.awt java.applet java.string ANSWER DOWNLOAD EXAMIANS APP
JAVA Strings What will be the output?String str1 = "abcde";System.out.println(str1.substring(1, 3)); bc bcd None of these abcd abc bc bcd None of these abcd abc ANSWER DOWNLOAD EXAMIANS APP