Loading

Q1.

 Which of the following is NOT a primitive data type in Java?

A. int
B. String
C. char
D. boolean

Q2.

What is the default value of a boolean variable in Java?

A. true
B. false
C. 0
D. null

Q3.

 Which data type is used to store decimal numbers with single precision?

A. double
B. float
C. int
D. long

Q4.

What is the size of the char data type in Java?

A. 1 byte
B. 2 bytes
C. 4 bytes
D. Depends on system

Q5.

 Which of the following can hold the largest integer value in Java?

A. int
B. long
C. short
D. byte