10/14/24, 8:15 AM Programming in Java - - Unit 9 - Week 6 :
eswardilleswar8888@[Link]
([Link]
([Link]
NPTEL ([Link] » Programming in Java (course)
Course outline Week 06: Assignment 06
The due date for submitting this assignment has passed.
About NPTEL () Due on 2024-09-04, 23:59 IST.
How does an NPTEL
online course work?
Assignment submitted on 2024-09-04, 22:01 IST
() 1) What is the output of the following program? 1 point
Week 0 : ()
Week 1 : ()
Week 2 : ()
[Link] 1/9
10/14/24, 8:15 AM Programming in Java - - Unit 9 - Week 6 :
Week 3 : ()
Week 4 : ()
Week 5 : ()
Week 6 : ()
Lecture 26 :
Demonstration-X (unit?
unit=58&lesson=59)
Lecture 27 :
Multithreading-I (unit?
unit=58&lesson=60)
a. “Hello World”
Lecture 28 :
b. “Cannot divide by 0”
Multithreading-II (unit?
unit=58&lesson=61) c. Compilation Error
d. Runtime Error (the code compiles successfully)
Lecture 29 :
Demonstration-XI (unit? Yes, the answer is correct.
unit=58&lesson=62) Score: 1
Accepted Answers:
Lecture 30 : I-O
c. Compilation Error
Stream-I (unit?
unit=58&lesson=63) 2) What will be the output of the following program? 1 point
Feedback Form (unit?
unit=58&lesson=178)
Week 06 :
Programming
Assignment 1
(/noc24_cs105/progassi
gnment?name=393)
Week 06 :
Programming
Assignment 2
[Link] 2/9
10/14/24, 8:15 AM Programming in Java - - Unit 9 - Week 6 :
(/noc24_cs105/progassi
gnment?name=394)
Week 06 :
Programming
Assignment 3
(/noc24_cs105/progassi
gnment?name=395)
Week 06 :
Programming
Assignment 4
(/noc24_cs105/progassi
gnment?name=396)
Week 06 :
Programming
Assignment 5
(/noc24_cs105/progassi
gnment?name=397)
a. 20
Quiz: Week 06: b. 21
Assignment 06
c. 19
(assessment?
name=434) d. 22
Week 06 : Assignment Yes, the answer is correct.
Score: 1
Solution (unit?
unit=58&lesson=439)
Accepted Answers:
b. 21
Week 7 : ()
3) What is the output of the following program? 1 point
Week 8 : ()
Week 9 : ()
Week 10 : ()
Week 11 : ()
[Link] 3/9
10/14/24, 8:15 AM Programming in Java - - Unit 9 - Week 6 :
Week 12 : ()
Books ()
Text Transcripts ()
a. 1
b. 2
c. 0
d. Compilation Error
Yes, the answer is correct.
Score: 1
Accepted Answers:
c. 0
4) Which exception is thrown when an array element is accessed beyond the array size? 1 point
[Link] 4/9
10/14/24, 8:15 AM Programming in Java - - Unit 9 - Week 6 :
a. ArrayElementOutOfBounds
b. ArrayIndexOutOfBoundsException
c. ArrayIndexOutOfBounds
d. None of these
Yes, the answer is correct.
Score: 1
Accepted Answers:
b. ArrayIndexOutOfBoundsException
5) What is the output of the following program? 1 point
a. java
[Link] 5/9
10/14/24, 8:15 AM Programming in Java - - Unit 9 - Week 6 :
b. java
course
c. nptel
course
d. Compilation Error
Yes, the answer is correct.
Score: 1
Accepted Answers:
d. Compilation Error
6) Fill in the blank in the program so that the output is “Java”. 1 point
a. public void
b. void
c. private void
d. static void
Yes, the answer is correct.
Score: 1
Accepted Answers:
a. public void
[Link] 6/9
10/14/24, 8:15 AM Programming in Java - - Unit 9 - Week 6 :
7) How many times will “Java” be printed if the following code is executed? 1 point
a. 0
b. 1
c. 2
d. 3
No, the answer is incorrect.
Score: 0
Accepted Answers:
c. 2
8) The following is a simple program using the concept of thread. What is the output of the following program? 1 point
[Link] 7/9
10/14/24, 8:15 AM Programming in Java - - Unit 9 - Week 6 :
a. 1 3 5 7
b. 2 4 6 8
c. 1 3 5 7 9
d. 2 4 6
Yes, the answer is correct.
Score: 1
Accepted Answers:
b. 2 4 6 8
9) For the program given below, what will be the output after its execution? 1 point
a. 1
b. 2
[Link] 8/9
10/14/24, 8:15 AM Programming in Java - - Unit 9 - Week 6 :
c. 0
d. 01
Yes, the answer is correct.
Score: 1
Accepted Answers:
a. 1
10) Which of the following method returns a reference to the currently executing thread object? 1 point
a. public static boolean interrupted();
b. public static Thread currentThread();
c. public final boolean isAlive();
d. public final void suspend();
Yes, the answer is correct.
Score: 1
Accepted Answers:
b. public static Thread currentThread();
[Link] 9/9