JAVA Strings String str1 = "Kolkata".replace('k', 'a');In the above statement, the effect on string Kolkata is Displays error message The first occurrence of k is replaced by a. All characters k are replaced by a. All characters a are replaced by k. Displays error message The first occurrence of k is replaced by a. All characters k are replaced by a. All characters a are replaced by k. ANSWER DOWNLOAD EXAMIANS APP
JAVA Strings The class string belongs to ................. package. java.awt java.lang java.applet java.string java.awt java.lang java.applet java.string ANSWER DOWNLOAD EXAMIANS APP
JAVA Strings What will be the output?public class Test{ public static void main (String[] args){ String test = "a1b2c3"; String[] tokens = test.split("\\d"); for(String s: tokens) System.out.print(s); } } 123 Runtime exception thrown abc Compilation error 123 Runtime exception thrown abc Compilation error 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 How many Constructor String class have? 11 7 2 None of this 13 11 7 2 None of this 13 ANSWER DOWNLOAD EXAMIANS APP