1. Which of the following is NOT a primitive data type in Java??
a. int
b. boolean
c. String
d. char
Answer :- c
2. Consider the following program.
What is the output of the above code?
a. 127
b. -127
c. 129
d. 2
Answer :- b
3.Which of the following concept that Java doesn’t support?
a. inheritance
b. encapsulation
c. pointer
d. arrey
Answer :- c
4. Which of the following is not a keyword in java?
a. import
b. super
c. method
d. class
Answer :- c
5. Consider the following program.
What will be the output of the program if it is executed?
a. 12 20 13
b. 12 20 15
c. 12 20Â 015
d. 12 20 F
Answer :- a
6. Match the following java terms with their descriptions?
a. A-1. B-2, C-3
b. A-2, B-3. C-1
c. A-3, B-2,C-1
d. A-3, B-1.C-2
Answer :- a
7. Consider the following program.
What will be the output of the program if it is executed ?
a. 20
b. 2
C. Compiler error
d. 40
Answer :- c
8. What is the output of the following code?
a. null
b. true
c. false
d. 1
Answer :- c
9. Which program is used to compile Java source code into bytecode?
a. javap
b. javac
C. java
d. javad
Answer :- b
10. Consider the following program.
What will be the output of the program if it is executed?
a. 50
b. 10
c. Compiler error
d. 5
Answer :- a