JAVA Strings The String method compareTo() returns an int value false -1 1 true an int value false -1 1 true ANSWER DOWNLOAD EXAMIANS APP
JAVA Strings Determine output:public class Test{ public static void main(String args[]){ String s1 = "SITHA";String s2 = "RAMA";System.out.println(s1.charAt(0) > s2.charAt(0)); }} Throws Exception true Compilation error 0 false Throws Exception true Compilation error 0 false ANSWER DOWNLOAD EXAMIANS APP
JAVA Strings How many Constructor String class have? None of this 2 11 7 13 None of this 2 11 7 13 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. All characters a are replaced by k. The first occurrence of k is replaced by a. Displays error message All characters k are replaced by a. All characters a are replaced by k. The first occurrence of k is replaced by a. Displays error message ANSWER DOWNLOAD EXAMIANS APP
JAVA Strings What will be the output of the following program code?public class Test{ public static void main(String args[]){ String s = "what"; StringBuffer sb = new StringBuffer("what"); System.out.print(sb.equals(s)+","+s.equals(sb)); }} None of these true,true false,true true,false false,false None of these true,true false,true true,false false,false 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 false true 0 Displays error message 1 false true 0 Displays error message ANSWER DOWNLOAD EXAMIANS APP