wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

JAVA QUIZ-1

Total questions: 10

Worksheet time: 2mins

Name
Class
Date
1.

Which of the following option leads to the portability and security of Java?

a)

a) Bytecode is executed by JVM

b)

b) The applet makes the Java code secure and portable

c)

c) Use of exception handling

d)

d) Dynamic binding between objects

2.

Which of the following is not a Java features?

a)

a)Dynamic

b)

b)Architecture Neutral

c)

c)Use of pointers

d)

d)Object-oriented

3.

Which keyword is used for accessing the features of a package ?

a)

a)package

b)

b)import

c)

c)extends

d)

d)export

4.

What is the range of byte data type in Java ?

a)

a) -128 to 127

b)

b) -32768 to 32767

c)

c) -2147483648 to 2147483647

d)

d) None of the mentioned

5.

Which of these operators is used to allocate memory to array variable in Java ?

a)

a) malloc

b)

b) alloc

c)

c) new

d)

d) new malloc

6.

Which of these is an incorrect array declaration ?

a)

a) int arr[] = new int[5]

b)

b) int [] arr = new int[5]

c)

c) int arr[] = new int[5]

d)

d) int arr[] = int [5] new

7.

Which of these is returned by “greater than”, “less than” and “equal to” operators ?

a)

a) Integers

b)

b) Floating – point numbers

c)

c) Boolean

d)

d) None of the mentioned

8.

What is the output of relational operators ?

a)

a) Integer

b)

b) Boolean

c)

c) Characters

d)

d) Double

9.

Which of the following operators can operate on a boolean variable ?

1. &&

2. ==

3. ?:

4. +=

a)

a) 3 & 2

b)

b) 1 & 4

c)

c) 1, 2 & 4

d)

d) 1, 2 & 3

10.

Which of these have highest precedence ?

a)

a) ()

b)

b) ++

c)

c) *

d)

d) >>