wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Java Chapter 1 CS2

Total questions: 16

Worksheet time: 8mins

Name
Class
Date
1.

Class is another name for a program in Java

a)
True
b)
False
2.

Computers process data under the control of sets of instructions called

a)

logic

b)

programs

c)

classes

d)

software

3.

The rules of a programming language constitute its __________.

a)

Syntax

b)

Logic

c)

Format

d)

Objects

4.

Java is architecturally __________.

a)

Specific

b)

Oriented

c)

Neutral

d)

Abstract

5.

All Java programming statements must end with a __________.

a)

Period

b)

Comma

c)

Semicolon

d)

Closing Parenthesis

6.

All Java applications must have a method named __________.

a)

method ()

b)

main ()

c)

java ()

d)

hello ()

7.

Files containing Java source code use the file extension __________.

a)

.java

b)

.class

c)

.txt

d)

.src

8.
A compiler ignores whitespace between words and lines. 
a)
True
b)
False
9.

He was the developer of Java Language.

a)

James Gowsling

b)

Jackie Gosling

c)

James Gosling

d)

Jackie Gosling

10.

Which of this command is the correct way of printing in Java?

a)

System.Out.println

b)

System.out.Println

c)

System.out.println

d)

system.out.println

11.

Which of this command has errors? Select multiple

a)

System.out.println("Hello World")

b)

System.out.println(Hello World);

c)

System.out.Println("Hello World);

d)

system.out.println("Hello World");

12.

Which of the followings is Java code that starts from the main() method as a mandatory part of every program

a)

public void static main(String args [])

b)

public void main static (args[] String)

c)

public static void main (String[] args)

d)

public static void main [String [] Args]

13.

It is an optional statement used to describe what a program or a line of program is doing.

a)

tag

b)

command

c)

code

d)

comment

14.

True or False : Java is case sensitive, which means identifier Hello and hello would have different meaning in Java

a)

True

b)

False

15.

A Java statement is one or more lines of code terminated by a semicolon. True or False?

a)

False

b)

True

16.

Identifiers can start with a number. True or False?

a)

True

b)

False