Course Content
Week 1 Answers 2023 (Free)
0/1
Week 2 Answers 2023
0/1
Week 3 Answers 2023
0/1
Week 4 Answers 2023
0/1
Week 5 Answers 2023
0/1
Week 6 Answers 2023
0/1
Week 7 Answers 2023
0/1
Week 8 Answers 2023
0/1
Week 9 Answers 2023
0/1
Week 10 Answers 2023
0/1
Week 11 Answers 2023
0/1
Week 12 Answers 2023
0/1
PYQ [Week 1-12] NPTEL Programming In Java Assignment Answers 2023

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.

image 1

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.

image 2

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?

image 3

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.

image 4

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?

image 5

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.

image 7

What will be the output of the program if it is executed?
a. 50
b. 10
c. Compiler error
d. 5

Answer :- a
0% Complete