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.
![[Week 1-11] NPTEL Programming In Java Assignment Answers 2023 29 image 1](https://gecmunger.in/wp-content/uploads/2023/07/image-1.png)
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.
![[Week 1-11] NPTEL Programming In Java Assignment Answers 2023 30 image 2](https://gecmunger.in/wp-content/uploads/2023/07/image-2.png)
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?
![[Week 1-11] NPTEL Programming In Java Assignment Answers 2023 31 image 3](https://gecmunger.in/wp-content/uploads/2023/07/image-3.png)
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.
![[Week 1-11] NPTEL Programming In Java Assignment Answers 2023 32 image 4](https://gecmunger.in/wp-content/uploads/2023/07/image-4.png)
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?
![[Week 1-11] NPTEL Programming In Java Assignment Answers 2023 33 image 5](https://gecmunger.in/wp-content/uploads/2023/07/image-5.png)
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.
![[Week 1-11] NPTEL Programming In Java Assignment Answers 2023 34 image 7](https://gecmunger.in/wp-content/uploads/2023/07/image-7.png)
What will be the output of the program if it is executed?
a. 50
b. 10
c. Compiler error
d. 5
Answer :- a