JAVA Strings What will be the output?String str1 = "abcde";System.out.println(str1.substring(1, 3)); abcd abc None of these bcd bc abcd abc None of these bcd bc ANSWER DOWNLOAD EXAMIANS APP
JAVA Strings How many objects will be created?String a = new String("Examveda");String b = new String("Examveda");String c = "Examveda";String d = "Examveda"; 3 None of this 2 4 3 None of this 2 4 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)); }} None of these true,true true,false false,false false,true None of these true,true true,false false,false false,true ANSWER DOWNLOAD EXAMIANS APP
JAVA Strings The String method compareTo() returns true false -1 an int value 1 true false -1 an int value 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);}} Throws an exception Hellow None of these Hello Compilation error Throws an exception Hellow None of these Hello Compilation error 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); }} Displays error message 0 false 1 true Displays error message 0 false 1 true ANSWER DOWNLOAD EXAMIANS APP