wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

ICT Java programming workshop

Total questions: 10

Worksheet time: 5mins

Name
Class
Date
1.

From the following which is NOT an example of a class?

a)

Animals

b)

Cars

c)

Simon's cat

d)

Tools

2.

What is the error in this program?

a)

Missing opening bracket {

b)

Missing closing bracket }

c)

Missing closing parenthesis )

d)

Missing opening parenthesis (

3.

What is the error in this program?

a)

Closing parenthesis )

b)

semicolon is missing ;

c)

Quotation is not closed "

d)

Opening bracket {

4.

What is the name of the window where the IDE shows the results of a program?

a)

Console window

b)

Debug window

c)

Emerging window

5.

If we run this program, what would be shown in the console?

a)

The operation is 50

b)

The operation is

30

c)

Nothing

d)

An error

6.

This program prints in console

a)

The variables x and y.

b)

The variables and the result of the operation.

c)

Nothing, because there is an error.

d)

Only the result of the operation.

7.

This program will print in console the following:

a)

The palindrom is borrow or rob

b)

The palindrom is rob or borrow

8.

In this code, the text after the "//" character is used to

a)

Perform internal operations

b)

Print important information to the user

c)

Describe what each of the lines of code represent in the program

d)

Define variables

9.

This code will print in the console

a)

a

b)

b

c)

a+b

d)

a-b

10.

From the following, which CANNOT be used as a class name?

a)

HelloWorld

b)

helloWorld

c)

Hello World

d)

H3lloW0rld