JAVA Strings How many Constructor String class have? 11 13 7 2 None of this 11 13 7 2 None of this 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)); }} twoone None of these two one onetwo twoone None of these two one onetwo 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 123 Runtime exception thrown Compilation error abc 123 Runtime exception thrown Compilation error ANSWER DOWNLOAD EXAMIANS APP
JAVA Strings The class string belongs to ................. package. java.string java.lang java.applet java.awt java.string java.lang java.applet java.awt 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"); } }} "1" is printed. "2" is printed. "3" is printed. An exception is thrown at runtime. Compilation fails. "1" is printed. "2" is printed. "3" is printed. An exception is thrown at runtime. Compilation fails. 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 s1 = "java";String s2 = "java";System.out.println(s1.equals(s2));System.out.println(s1 == s2); }} false true false false true true true false false true false false true true true false ANSWER DOWNLOAD EXAMIANS APP