JAVA Strings The String method compareTo() returns false -1 1 an int value true false -1 1 an int value true 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 4 2 3 None of this 4 2 3 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)); }} Compilation error 0 true false Throws Exception Compilation error 0 true false Throws Exception 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 0 false 1 Displays error message true 0 false 1 Displays error message ANSWER DOWNLOAD EXAMIANS APP
JAVA Strings How many Constructor String class have? 7 13 None of this 11 2 7 13 None of this 11 2 ANSWER DOWNLOAD EXAMIANS APP
JAVA Strings String str1 = "Kolkata".replace('k', 'a');In the above statement, the effect on string Kolkata is All characters a are replaced by k. All characters k are replaced by a. Displays error message The first occurrence of k is replaced by a. All characters a are replaced by k. All characters k are replaced by a. Displays error message The first occurrence of k is replaced by a. ANSWER DOWNLOAD EXAMIANS APP