JAVA Strings toString() method is defined in java.lang.String None of these java.lang.util java.lang.Object java.lang.String None of these java.lang.util java.lang.Object 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. Displays error message All characters k are replaced by a. The first occurrence of k is replaced by a. All characters a are replaced by k. Displays error message All characters k are replaced by a. The first occurrence of k is replaced by a. ANSWER DOWNLOAD EXAMIANS APP
JAVA Strings What will be the output?String str1 = "abcde";System.out.println(str1.substring(1, 3)); abc abcd bc None of these bcd abc abcd bc None of these bcd ANSWER DOWNLOAD EXAMIANS APP
JAVA Strings How many Constructor String class have? 13 2 7 None of this 11 13 2 7 None of this 11 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); } } abc Compilation error 123 Runtime exception thrown abc Compilation error 123 Runtime exception thrown ANSWER DOWNLOAD EXAMIANS APP
JAVA Strings The String method compareTo() returns -1 false true 1 an int value -1 false true 1 an int value ANSWER DOWNLOAD EXAMIANS APP