Skip to content

Commit 234f486

Browse files
Index
Week 6 Update
1 parent 7fd0e60 commit 234f486

File tree

1 file changed

+45
-5
lines changed

1 file changed

+45
-5
lines changed

README.md

+45-5
Original file line numberDiff line numberDiff line change
@@ -95,16 +95,56 @@ For example, if user’s input is 1, then it will throw and catch “java.lang.N
9595

9696
## [WEEK 6](https://github.com/bkkothari2255/Programming_In_Java_NPTEL/tree/WEEK-6)
9797

98-
[Java Week 6:Q1]()
98+
[Java Week 6:Q1](https://github.com/bkkothari2255/Programming_In_Java_NPTEL/blob/WEEK-6/Question61.java)
99+
Complete the code segment to print the following using the concept of extending the Thread class in Java:
100+
101+
-----------------OUTPUT-------------------
102+
103+
Thread is Running.
104+
105+
106+
[Java Week 6:Q2](https://github.com/bkkothari2255/Programming_In_Java_NPTEL/blob/WEEK-6/Question62.java)
107+
In the following program, a thread class ThreadRun is created using the Runnable interface which prints "Thread using Runnable interface". Complete the main class to create a thread object of the class ThreadRun and run the thread,
99108

100-
[Java Week 6:Q2]()
109+
[Java Week 6:Q3](https://github.com/bkkothari2255/Programming_In_Java_NPTEL/blob/WEEK-6/Question63.java)
110+
A part of the Java program is given, which can be completed in many ways, for example using the concept of thread, etc. Follow the given code and complete the program so that your program prints the message "NPTEL Java". Your program should utilize the given interface/ class.
101111

102-
[Java Week 6:Q3]()
112+
[Java Week 6:Q4](https://github.com/bkkothari2255/Programming_In_Java_NPTEL/blob/WEEK-6/Question64.java)
113+
Execution of two or more threads occurs in a random order. The keyword 'synchronized' in Java is used to control the execution of thread in a strict sequence. In the following, the program is expected to print some numbers. Do the necessary use of 'synchronized' keyword, so that, the program prints the output in the following order:
103114

104-
[Java Week 6:Q4]()
115+
-----------------OUTPUT-------------------
116+
117+
5
118+
119+
10
120+
121+
15
122+
123+
20
124+
125+
25
126+
127+
100
128+
129+
200
130+
131+
300
132+
133+
400
134+
135+
500
136+
137+
138+
[Java Week 6:Q5](https://github.com/bkkothari2255/Programming_In_Java_NPTEL/blob/WEEK-6/Question65.java)
139+
Add necessary codes to print the following:
140+
141+
-----------------OUTPUT-------------------
142+
143+
Name of thread 't':Thread-0
105144

106-
[Java Week 6:Q5]()
145+
New name of thread 't':NPTEL
107146

147+
Thread is running.
108148

109149
## [WEEK 7](https://github.com/bkkothari2255/Programming_In_Java_NPTEL/tree/WEEK-7)
110150

0 commit comments

Comments
 (0)