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 abc Compilation error Runtime exception thrown 123 abc Compilation error Runtime exception thrown ANSWER DOWNLOAD EXAMIANS APP
JAVA Strings toString() method is defined in java.lang.Object java.lang.util None of these java.lang.String java.lang.Object java.lang.util None of these java.lang.String ANSWER DOWNLOAD EXAMIANS APP
JAVA Strings The class string belongs to ................. package. java.string java.awt java.lang java.applet java.string java.awt java.lang java.applet ANSWER DOWNLOAD EXAMIANS APP
JAVA Strings What will be the output?String str1 = "abcde";System.out.println(str1.substring(1, 3)); abcd None of these bcd bc abc abcd None of these bcd bc abc 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)); }} None of these onetwo two one twoone None of these onetwo two one twoone ANSWER DOWNLOAD EXAMIANS APP
JAVA Strings What will be the output of the following program code?class LogicalCompare{ public static void main(String args[]){ String str1 = new String("OKAY"); String str2 = new String(str1); System.out.println(str1 == str2); }} false Displays error message 1 0 true false Displays error message 1 0 true ANSWER DOWNLOAD EXAMIANS APP