wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Java_1_2_3_Program_Quiz

Total questions: 6

Worksheet time: 3mins

Name
Class
Date
1.

What does Integer.parseInt(args[0]) do?

a)

a) Converts int to string

b)

b) Converts string to int

c)


c) Reads matrix input

d)

d) Generates random number

2.

top = -1 means?

a)

a) Stack full

b)

b) Stack empty

c)

c) Stack overflow

d)

d) Stack index starts at 0

3.

Stack follows which rule?

a)

a) FIFO

b)

b) LIFO

c)

c) FILO

d)

d) Random order

4.

Output?

push(5) ;

push(7) ;

pop();

a)

a) Popped: 7

b)

b) Popped: 5

c)

c) Stack empty

d)

d) stack full

5.

What does peek() do?

a)

a) Removes top element

b)

b) Inserts new value

c)

c) Shows top value

d)

d) Clears stack

6.

private keyword shows?

a)

a) Polymorphism

b)

b) Encapsulation

c)

c) Inheritance

d)

d) Abstraction