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 2 None of this 3 4 2 None of this 3 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); }} true Displays error message 1 false 0 true Displays error message 1 false 0 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?String str1 = "abcde";System.out.println(str1.substring(1, 3)); abcd bcd None of these bc abc abcd bcd None of these bc abc ANSWER DOWNLOAD EXAMIANS APP
JAVA Strings What will be output?String S1 = "S1 ="+ "123"+"456";String S2 = "S2 ="+(123+456); S1=123456,S2=123456 S1=123456, S2=579 S1=579,S2=579 None of This S1=123456,S2=123456 S1=123456, S2=579 S1=579,S2=579 None of This ANSWER DOWNLOAD EXAMIANS APP
JAVA Strings How many Constructor String class have? 13 11 2 7 None of this 13 11 2 7 None of this ANSWER DOWNLOAD EXAMIANS APP