GkSeries.com

Java Applets - Multiple Choice Questions and Answers - Core Java MCQs

(6) Which of the following statement is false in view of the applets in Java?
[A] Applets do not need a main() method
[B] Applets must be run under an applet viewer or a java-compatible browser
[C] User I/O is not accomplished with Java's stream I/O classes. Instead, applets use the interface provided by the AWT
[D] All are true

Comment

Answer: Option [D]
(7) Which of the following sequence of method calls take place when an applet begins?
[A] init(), start(), create()
[B] start(), init(), paint()
[C] init(), start(), paint()
[D] none of these

Comment

Answer: Option [C]

The methods used in applet are init(), start(0, stop(), destroy(), paint(Graphics)

(8) Which of the following is NOT defined by applet class?
[A] init()
[B] paint()
[C] start()
[D] none of these

Comment

Answer: Option [A]

Init() method is a built in Java class. It is not defined by applet class because it is already written inside.

(9) Which of the following methods is defined by the Applet class?
[A] init()
[B] paint()
[C] start()
[D] none of these above

Comment

Answer: Option [D]
(10) What is not true about applets?
[A] Applets do not need a main() method
[B] Applets should be run under a Java-compatible browser
[C] Applet uses the interface provided by AWT
[D] User I/O is accomplished with Java's stream I/O classes

Comment

Answer: Option [D]

The classes java.io.InputStream and java.io.OutputStream are the root classes of all java IO input stream and Java IO Output stream classes respectively.

Chapters

Click Here to Read more questions