wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Unit 1

Total questions: 30

Worksheet time: 13mins

Name
Class
Date
1.
Which data type is used for variables storing single characters?
a)
int
b)
double
c)
char
d)
String
2.
Which data type is used for variables storing whole numbers?
a)
int
b)
double
c)
char
d)
String
3.
Which data type is used for variables storing a group of words?
a)
int
b)
double
c)
char
d)
String
4.
Which data type is used for variables storing decimal numbers?
a)
int
b)
double
c)
char
d)
boolean
5.
A variable/identifier can NOT start with which of the following?
a)
Uppercase Letter
b)
Lowercase Letter
c)
Underscore
d)
Number
6.
Which of the following is an example of a binary number?
a)
11001100
b)
12300210
c)
255
d)
There is no such thing as a binary number
7.
Modulus (%) in Java means what?
a)
Multiplication
b)
Division
c)
Remainder
d)
Percent
8.
How many mathematical operators are there in Java?
a)
2
b)
3
c)
4
d)
5
9.
Which is of the following is an INVALID variable?
a)
x365
b)
TIGERS!
c)
_9_8_7
d)
Go_Tigers_Win
10.
Which of the following is an INVALID assignment statement in Java?
a)
x = 5x;
b)
x = 5 * x;
c)
x = 365;
d)
x = "YAY!";
11.

Which of the following escape sequence creates a new line?

a)

\n

b)

/n

c)

\t

d)

\\

12.

Which of the following escape sequence tabs?

a)

\/t

b)

tt

c)

\t

d)

/t

13.

Which of the following is an invalid variable?

a)

hi5

b)

5_hi

c)

y_89

d)

_five

14.

What is the result of 12.0 % 3

a)

4

b)

4.0

c)

0

d)

0.0

15.

What is the result of 4/3

a)

1

b)

1.0

c)

0

d)

0.0

16.

What does CPU stand for?

a)

Computer Processing Unit

b)

Central Processing Unit

c)

Computer Protocol Unit

d)

Centrol Protocol Unit

17.

What does RAM stand for?

a)

Read Amazing Memory

b)

Read Access Memory

c)

Random Access Memory

d)

Random Awareness Machine

18.

How many bits are in a byte?

a)

1

b)

8

c)

32

d)

128

19.

What is a BIT?

a)

Binary Integer Type

b)

Binary Int Tech

c)

Binary Digit

d)

Binary Digit Type

20.

Errors in a program are called what?

a)

bit

b)

byte

c)

error

d)

bug

21.

The Control Unit and the Arithmetic/Logic Unit make up what?

a)

CPU

b)

ALU

c)

CU

d)

BIT

22.

What can store a single character?

a)

double

b)

bit

c)

byte

d)

int

23.

What are the tangible components of a computer

a)

CPU

b)

Output

c)

Software

d)

Hardware

24.

What word signifies a constant in Java?

a)

int

b)

char

c)

double

d)

final

25.

Variables of the int type can store what kind of values?

a)

Decimal values

b)

Single characters

c)

Whole numbers

d)

True or false

26.

Variables of the double type can store what kinds of values?

a)

Single characters

b)

Decimal numbers

c)

Whole numbers

d)

True or false

27.

The char data type stores what kind of values?

a)

Single characters

b)

Single characters surround by double quotes

c)

Single characters surround by single quotes

d)

Strings

28.

What signifies the start and end of a block of code?

a)

Braces

b)

Brackets

c)

Parenthesis

d)

Quotes

29.

ROM stands for what?

a)

Read Only Memory

b)

Read Online Memory

c)

Random Ordered Memory

d)

Random Online Memory

30.

Which of the following is a VALID assignment statement?

a)

x + 5 = y

b)

y = 5x;

c)

x = 2 + y;

d)

x = 2y;