Hard Multiple Choice QuestionsΒΆ

These problems are harder than most of those that you will usually see on the AP CS A exam.

4-9-1: Given the following code segment, which of the following is true?

String s1 = new String("Hi There");
String s2 = new String("Hi There");
String s3 = s1;

I.   (s1 == s2)
II.  (s1.equals(s2))
III. (s1 == s3)
IV.  (s2.equals(s3))






4-9-2: What does the following code print?

System.out.println("13" + 5 + 3);