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)); }} two twoone one onetwo None of these two twoone one onetwo None of these ANSWER DOWNLOAD EXAMIANS APP
JAVA Strings What will be the output?String str1 = "abcde";System.out.println(str1.substring(1, 3)); bcd abc bc abcd None of these bcd abc bc abcd None of these ANSWER DOWNLOAD EXAMIANS APP
JAVA Strings What could be output of the following fragment of code?public class Test{ public static void main(String args[]){ String x = "hellow";int y = 9;System.out.println(x += y); } } None of these Throws an exception as string and int are not compatible for addition 9hellow Compilation error hellow9 None of these Throws an exception as string and int are not compatible for addition 9hellow Compilation error hellow9 ANSWER DOWNLOAD EXAMIANS APP
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 None of this 2 3 4 None of this 2 3 ANSWER DOWNLOAD EXAMIANS APP
JAVA Strings The String method compareTo() returns false 1 an int value true -1 false 1 an int value true -1 ANSWER DOWNLOAD EXAMIANS APP
JAVA Strings toString() method is defined in None of these java.lang.String java.lang.util java.lang.Object None of these java.lang.String java.lang.util java.lang.Object ANSWER DOWNLOAD EXAMIANS APP