P7 Test Questions

(Project Test Home Page)

# Question
1 Applets methods paint() & init()
Which of the following statements is true?

A. init() is called first, then paint();
B. paint() is called first, then init();
C. The paint() method is called every time the window is brought into focus. init() is only called once.
D. None of the above.

2 Applet "param" properties.
Which of the following statements is true?

<applet code="HelloWorld.class" codebase="." align="baseline" width="275" height="55">
<param name=
"First" value="Michael">
<param name=
"Last" value="Thomas">
<param name=
"Middle" value="Arthur">
</applet>

A. getParameter( "First" ) returns "Michael"
B. getParameter( "first" ) returns "Michael"
C. getParameter( "First" ) + " " + getParameter("Last") returns "Michael Thomas"
D. None of the above.