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. Displays error message All characters k are replaced by a. All characters a are replaced by k. The first occurrence of k is replaced by a. Displays error message All characters k are replaced by a. All characters a are replaced by k. ANSWER DOWNLOAD EXAMIANS APP
JAVA Strings toString() method is defined in java.lang.String java.lang.util None of these java.lang.Object java.lang.String java.lang.util None of these java.lang.Object ANSWER DOWNLOAD EXAMIANS APP
JAVA Strings How many Constructor String class have? None of this 2 7 13 11 None of this 2 7 13 11 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. Compilation fails. An exception is thrown at runtime. "1" is printed. "3" is printed. "2" is printed. Compilation fails. An exception is thrown at runtime. "1" is printed. "3" is printed. ANSWER DOWNLOAD EXAMIANS APP
JAVA Strings What is the output of the following println statement?String str1 = "Hellow";System.out.println(str1.indexOf('t')); -1 0 1 false true -1 0 1 false 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 3 2 None of this 4 3 2 ANSWER DOWNLOAD EXAMIANS APP