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)); }} true 0 Compilation error Throws Exception false true 0 Compilation error Throws Exception false ANSWER DOWNLOAD EXAMIANS APP
JAVA Strings The String method compareTo() returns true 1 an int value -1 false true 1 an int value -1 false ANSWER DOWNLOAD EXAMIANS APP
JAVA Strings How many Constructor String class have? 11 13 7 None of this 2 11 13 7 None of this 2 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); }} true Displays error message false 1 0 true Displays error message false 1 0 ANSWER DOWNLOAD EXAMIANS APP
JAVA Strings Determine output:public class Test{ public static void main(String args[]){ String str = null; if(str.length() == 0){ System.out.print("1"); } else if(str == null){ System.out.print("2"); } else{ System.out.print("3"); } }} "2" is printed. "3" is printed. "1" is printed. Compilation fails. An exception is thrown at runtime. "2" is printed. "3" is printed. "1" is printed. Compilation fails. An exception is thrown at runtime. 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"; None of this 2 4 3 None of this 2 4 3 ANSWER DOWNLOAD EXAMIANS APP