Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Java Values and datatypes

Total questions: 20

Worksheet time: 10mins

Name
Class
Date
1.

Java character set consists of

a)

Letters

b)

Digits

c)

Operators

d)

Delimiters

e)

All of the above

2.

_________ is a standard encoding system used in JAVA which contains hexa decimal digits ranging from 0x0000 to 0xFFFF

a)

ISO

b)

IEC

c)

UNICODE

d)

ASCII

3.

________________ is an American standard coding system that is represented in 7 binary bits.

a)

ISO

b)

IEC

c)

UNICODE

d)

ASCII

4.

Non Graphic characters which are used as commands to direct the cursor while printing is known as _________________

a)

Operators

b)

Escape Sequence

c)

Delimiters

d)

Digits

5.

\n is used for ______

a)

New line feed

b)

Horizontal tab

c)

Vertical tab

d)

Backspace

6.

The escape sequence character for horizontal tab which gives 8 spaces between words when used ________

a)

\n

b)

\v

c)

\b

d)

\t

7.

We use ________ to display " in the output message

a)

\n

b)

\"

c)

\t

d)

\\

8.

____________ is the functional and fundamental unit of a computer program

a)

ASCII code

b)

UNICODE

c)

Escape sequence

d)

Token

9.

____________ are the constants in Java program

a)

Literals

b)

keywords

c)

identifiers

d)

operators

10.

There are _________ types of literals in Java

a)

4

b)

5

c)

6

d)

7

11.

A variable is a named _______________ which contains a value.

a)

constant

b)

memory location

c)

structure

d)

escape sequence

12.

_________ data type is used to store 'True' or 'False' value

a)

boolean

b)

int

c)

float

d)

char

13.

__________ data type is used to store decimal value

a)

int

b)

float

c)

double

d)

both float and double

14.

Initialization takes place in two different ways namely

a)

Static and constant

b)

Dynamic and constant

c)

Static and dynamic

d)

None of the above

15.

Java assumes fractional numbers to be of ____________ data type

a)

double

b)

float

c)

int

d)

long

16.

Implicit type conversion is also known as ______

a)

forced conversion

b)

type casting

c)

coercion

d)

none of the above

17.

Converting several data types into one single one is called ___________

a)

concatenation

b)

assignment

c)

variable declaration

d)

type conversion

18.

Explicit type conversion is known as ___________

a)

Coercion

b)

forced conversion

c)

type casting

d)

both second and third option

19.

size of double data type is ______________

a)

8 bits

b)

32 bits

c)

16 bits

d)

64 bits

20.

Size of boolean data type is

a)

8 bits

b)

1 bit

c)

16 bits

d)

32 bits