JAVA Strings String str1 = "Kolkata".replace('k', 'a');In the above statement, the effect on string Kolkata is The first occurrence of k is replaced by a. All characters k are replaced by a. Displays error message All characters a are replaced by k. The first occurrence of k is replaced by a. All characters k are replaced by a. Displays error message All characters a are replaced by k. ANSWER DOWNLOAD EXAMIANS APP
JAVA Strings What will be output?String S1 = "S1 ="+ "123"+"456";String S2 = "S2 ="+(123+456); S1=579,S2=579 None of This S1=123456,S2=123456 S1=123456, S2=579 S1=579,S2=579 None of This S1=123456,S2=123456 S1=123456, S2=579 ANSWER DOWNLOAD EXAMIANS APP
JAVA Strings What could be output of the following fragment of code?public class Test{ public static void main(String args[]){ String x = "hellow";int y = 9;System.out.println(x += y); } } None of these hellow9 9hellow Throws an exception as string and int are not compatible for addition Compilation error None of these hellow9 9hellow Throws an exception as string and int are not compatible for addition Compilation error ANSWER DOWNLOAD EXAMIANS APP
JAVA Strings How many Constructor String class have? 11 2 7 None of this 13 11 2 7 None of this 13 ANSWER DOWNLOAD EXAMIANS APP
JAVA Strings The String method compareTo() returns 1 false -1 true an int value 1 false -1 true an int value 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"; 2 None of this 3 4 2 None of this 3 4 ANSWER DOWNLOAD EXAMIANS APP