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)); }} onetwo two one None of these twoone onetwo two one None of these twoone ANSWER DOWNLOAD EXAMIANS APP
JAVA Strings The String method compareTo() returns -1 1 true an int value false -1 1 true an int value false ANSWER DOWNLOAD EXAMIANS APP
JAVA Strings What will be output?String S1 = "S1 ="+ "123"+"456";String S2 = "S2 ="+(123+456); S1=123456, S2=579 None of This S1=579,S2=579 S1=123456,S2=123456 S1=123456, S2=579 None of This S1=579,S2=579 S1=123456,S2=123456 ANSWER DOWNLOAD EXAMIANS APP
JAVA Strings String str1 = "Kolkata".replace('k', 'a');In the above statement, the effect on string Kolkata is Displays error message All characters a are replaced by k. The first occurrence of k is replaced by a. All characters k are replaced by a. Displays error message All characters a are replaced by k. The first occurrence of k is replaced by a. All characters k are replaced by a. ANSWER DOWNLOAD EXAMIANS APP
JAVA Strings The class string belongs to ................. package. java.lang java.string java.applet java.awt java.lang java.string java.applet java.awt 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