JAVA Strings What is the output of the following println statement?String str1 = "Hellow";System.out.println(str1.indexOf('t')); true 1 0 false -1 true 1 0 false -1 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
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 2 3 4 None of this 2 3 4 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)); }} false Throws Exception Compilation error true 0 false Throws Exception Compilation error true 0 ANSWER DOWNLOAD EXAMIANS APP
JAVA Strings What will be the output of the following program?public class Test{ public static void main(String args[]){String str1 = "one";String str2 = "two";System.out.println(str1.concat(str2)); }} one None of these onetwo twoone two one None of these onetwo twoone two ANSWER DOWNLOAD EXAMIANS APP
JAVA Strings toString() method is defined in java.lang.Object None of these java.lang.String java.lang.util java.lang.Object None of these java.lang.String java.lang.util ANSWER DOWNLOAD EXAMIANS APP