wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Data type

Total questions: 17

Worksheet time: 6mins

Name
Class
Date
1.

Which data type is used to store:

TRUE

a)

Boolean

b)

Double

c)

String

d)

Integer

2.

Which data type is used to store:

100

a)

Integer

b)

Double

c)

Boolean

d)

String

3.
Which data type is used to store:
"D"
a)
Character
b)
String
c)
Integer
d)
Double
4.
This data type is used to store whole numbers
a)
Integer
b)
Double
c)
Boolean
d)
String
5.
This data type is used to store a mixture of letters and numbers and symbols.
a)
String
b)
Character
c)
Boolean
d)
Integer
6.

What is a variable?

a)

A storage location of memory which can change

b)

A random area to store things in.

c)

Something that changes

d)

Something that can only store numbers

7.
What data type would be best used to record the number of people at a party?
a)
Integer
b)
Real
c)
String
d)
Boolean
8.
Integers cannot store negative numbers.
a)
False
b)
True
9.
What data type would be best used to record an email address?
a)
String
b)
Integer
c)
Real
d)
Character
10.
Expressions cannot contain variables of different data types.
a)
False
b)
True
11.
Data types of variables can never be changed.
a)
False
b)
True
12.

It provides a runtime environment in which Java byte code can be executed

a)

JVM

b)

JDK

c)

JRE

d)

Eclipse IDE

13.

Which one is correct?

a)

public static main(Strings[] args) { }

b)

public private static main(Strings[] args) { }

c)

public static void main(Strings[] args) { }

d)

public void static main(Strings[] args) { }

14.

char is 2 byte in storage?

a)

True

b)

False

15.

(=) sign means

a)

equals and it is used for math problems in Java

b)

assignment operator. It used to assign a value

16.

int x = 3; in this case, which of the following statement is true?

a)

x = x+1;

b)

x++;

c)

x += 1;

d)

All of above

17.

Which one is used for remainder in Java?

a)

/

b)

%

c)

+

d)

*