JAVA Strings The output of the following fraction of code ispublic class Test{ public static void main(String args[]){ String s1 = new String("Hello");String s2 = new String("Hellow");System.out.println(s1 = s2);}} Hellow Throws an exception Compilation error Hello None of these Hellow Throws an exception Compilation error Hello None of these ANSWER DOWNLOAD EXAMIANS APP
JAVA Strings How many Constructor String class have? 11 None of this 13 2 7 11 None of this 13 2 7 ANSWER DOWNLOAD EXAMIANS APP
JAVA Strings What will be the output?String str1 = "abcde";System.out.println(str1.substring(1, 3)); bc None of these bcd abc abcd bc None of these bcd abc abcd ANSWER DOWNLOAD EXAMIANS APP
JAVA Strings String str1 = "Kolkata".replace('k', 'a');In the above statement, the effect on string Kolkata is All characters k are replaced by a. The first occurrence of k is replaced by a. Displays error message All characters a are replaced by k. All characters k are replaced by a. The first occurrence of k is replaced by a. Displays error message All characters a are replaced by k. 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); }} 1 0 false true Displays error message 1 0 false true Displays error message ANSWER DOWNLOAD EXAMIANS APP
JAVA Strings The class string belongs to ................. package. java.string java.applet java.awt java.lang java.string java.applet java.awt java.lang ANSWER DOWNLOAD EXAMIANS APP