Quiz 7 -- CS 290W -- Mar 9, 99

(1) Which of the following is the name of the java.lang class that is used for character strings?
(1) characterString
(2) string
(3) String
(4) newString
(3)

(2) Suppose that visit is an integer variable currently equal to 656. What will the following label say?
add(new Label("You are visitor " + (++visit)));
(1) You are visitor (656)
(2) You are visitor 656
(3) You are visitor 657
(4) You are visitor (++visit)
(3)

(3) How will the applet look as a result of?
for (x=0; x<10; x=x+1)
{g.drawString("hello", 25+35*x, 25);}
(1) "hello" will appear on 10 lines like stair steps.
(2) "hello" will appear only once at location 375, 25.
(3) "hello" will appear on 10 lines with each one directly beneath the one above.
(4) "hello" will appear on the same line 10 times.
(4)