How many string literals will be created in the constant pool of the code below
public class Strings { private static String STATIC="working"; private String a = null; public static void main(String ads[]){ String a="working"; Strings st= new Strings(); st.a="working"; System.out.println(Strings.STATIC==a); } }
What will be the output of the following code ?
public class Strings { public static void main(String ads[]){ String arr[]={"meow","bray","moo"}; String a="meow"; System.out.println(arr[0]==a); } }
What is the output of the following program ?
public class Strings { public static void main(String ads[]){ String a="meow"; String ab=a+"deal"; String abc="meowdeal"; System.out.println(ab==abc); } }
What will be the output of the following code snippet if tried to compile and run
String x= "abc" String y= "xyz"; x.concat(y); System.out.print(x);
What happens when you compile and run the program ?
public class Strings { public static void main(String ads[]){ String abc="abc"; String bed="bed"; String comb="abcBED"; System.out.println(abc+bed.equalsIgnoreCase(comb)); } }