JAVA Strings What is the output of the following println statement?String str1 = "Hellow";System.out.println(str1.indexOf('t')); 1 -1 false true 0 1 -1 false 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)); }} two onetwo twoone None of these one two onetwo twoone None of these one ANSWER DOWNLOAD EXAMIANS APP
JAVA Strings What will be output?String S1 = "S1 ="+ "123"+"456";String S2 = "S2 ="+(123+456); None of This S1=123456,S2=123456 S1=579,S2=579 S1=123456, S2=579 None of This S1=123456,S2=123456 S1=579,S2=579 S1=123456, S2=579 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
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 Runtime exception thrown 123 abc Compilation error Runtime exception thrown 123 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"; 4 None of this 3 2 4 None of this 3 2 ANSWER DOWNLOAD EXAMIANS APP