wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

NP Lab exam (12/11/20)

Total questions: 10

Worksheet time: 8mins

Name
Class
Date
1.

Which java package is used to create GUI application programs?

a)

java.lang

b)

java.awt

c)

java.io

2.

Which event is generated when clicking a Button?

a)

ActionEvent

b)

ClickEvent

c)

WindowEvent

3.

Which tool is used to display the output of an applet?

a)

java interpreter

b)

java compiler

c)

appletviewer

4.

Which command is used to compile a Java program?

a)

java

b)

javab

c)

javac

d)

javad

5.

Which one of the following command is used to run "Student.java" program.

a)

java Student.java

b)

java Student

c)

javac Student

6.

Applet programs does not contain main( ) method.

a)

True

b)

False

7.

Which one of the following is syntactically correct to set the background colour to green?

a)

Setbackground.green

b)

SetBackground(green)

c)

setBackground(Color.green)

d)

setBackgroundColor(green)

8.

Which one of the following is not a swing GUI component?

a)

JFrame

b)

JLabel

c)

Button

d)

JTextField

9.

Which of one of the following package does not contain GUI components?

a)

java.applet

b)

java.awt

c)

javax.swing

d)

java.io

10.

In applet, GUI designs are done inside ....... method.

a)

init( )

b)

start( )

c)

stop( )

d)

paint( )