Java - String overview
Q1.
Which of the following statements about Strings in Java is TRUE?
Q2.
What will be the output of the following code?
String s1 = "Java";
String s2 = "Java";
System.out.println(s1 == s2);
Q3.
Which method is used to compare the content of two strings in Java?
Q4.
Which of the following is the correct output?
String s = "Programming";
System.out.println(s.substring(3, 6));
Q5.
Which class is used when we need a mutable string in Java?