Java Programming - Java Applets Questions and Answers

This is Java Programming Questions and Answers Section on "Java Applets". These Questions are very useful for various interviews.
1. Which method is called first by an applet?
[A] start()
[B] run()
[C] init()
[D] paint()
Loading...
2. To display text on the applet........method is used.
[A] showString()
[B] drawString()
[C] println()
[D] printString()
Loading...
3. To run an applet..........command is used.
[A] run
[B] java
[C] appletviewer
[D] applet
Loading...
4. AppletViewer tool is available in which of the folder of JDK :
[A] bin
[B] lib
[C] source
[D] class
Loading...
5. The Applet class is in ...........package
[A] java.applet
[B] java.awt
[C] java.io
[D] java.util
Loading...
6. which method can be used to draw a circle in the applet?
[A] drawCircle()
[B] drawOval()
[C] drawArc()
[D] both b and c
Loading...
7. To display text in the applet status bar.........method is used.
[A] showStatus()
[B] showStatusBar()
[C] drawStatus()
[D] drawStatusBar()
Loading...
8. which of the following is an optional attribute of applet tag?
[A] Code
[B] Name
[C] Width
[D] Height
Loading...
9. Which method can be used to draw a rectangle in the a Applet?
[A] drawRect()
[B] drawPolygon()
[C] drawLine()
[D] all of these
Loading...
10. which package contains color class?
[A] java.applet
[B] java.awt
[C] java.graphics
[D] java.lang
Loading...
Are these questions helpful for you?

Comments: (Your feedback is valuable to us)