Wipro TalentNext PBL
Topics Covered: Thread Creation
No. Hands-on Assignment Topics Covered Status
1
Create two threads and assign names ‘Scooby’ and ‘Shaggy’ to the two threads. Display both thread names.
Setting the name of the thread.
2
store colours in the form of an array ex: String colours[]={"white","blue","black","green","red","yellow"}; display all colours repeatedly by generating colour index from Random class. If the random colour index matches to red stop display. Note: perform this task by implementing Runnabe interface
Thread creation
3
-
Create class of SalesPersons as a thread that will display fives sales persons name.
-
Create a class as Days as other Thread that has array of seven days.
-
Call the instance of SalesPersons in Days and start both the threads
-
suspend SalesPersons on Sunday and resume on wednesday Note: use suspend, resume methods from thread
Multi Threads creation