NPTEL Programming In Java Week 6 Assignment Answers 2025
1.

Answer :- For Answers Click Here
2. Which of the following best describes the concept of multithreading in Java?
a. Multiple threads execute concurrently, sharing the same memory space.
b. Only one thread executes at a time, ensuring sequential execution.
c. Threads in Java cannot communicate with each other.
d. Threads require separate memory allocation for each thread to run.
Answer :-
3.

Answer :-
4.

Answer :-
5.

Answer :-
6. Which of the following states can a thread enter during its lifecycle in Java?
a. New, Runnable, Running, Blocked
b. New, Runnable, Waiting, Blocked, Terminated
c. New, Runnable, Running, Sleeping, Dead
d. New, Active, Waiting, Suspended, Terminated
Answer :- For Answers Click Here
7. What does the thread scheduler use to decide which thread to run when multiple threads are in the runnable state?
a. Thread priority
b. Thread’s execution time
c. Thread name
d. Thread creation order
Answer :-
8.

Answer :-
9. What is the primary purpose of thread synchronization in Java?
a. To allow multiple threads to execute a method at the same time
b. To ensure thread execution follows a specific order
c. To prevent race conditions and ensure data consistency
d. To allow threads to communicate with each other
Answer :-
10. What is the primary difference between Byte Streams and Character Streams in Java?
a. Byte Streams handle characters, while Character Streams handle bytes.
b. Byte Streams are used for binary data, while Character Streams are used for text data.
c. Character Streams are faster than Byte Streams in all cases.
d. Character Streams cannot handle international characters like Unicode.
Answer :- For Answers Click Here