• Post Reply Bookmark Topic Watch Topic
  • New Topic

Thread to count to 100.  RSS feed

 
stan zhu
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi guys, Need some help here i have to make 2 Thread classes first class subclasses Thread and it will print the timestamp of startup and waits for the second thread to start and then prints the timestamp on program exit. Second class implements Runnable and will count from 1-100. Need some help on getting this started. Thank you!
 
Tushar Goel
Ranch Hand
Posts: 934
4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you show us what have you tried to far? Right down steps in plain english.
 
stan zhu
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here's my code i have tried so far. I couldn't figure out how to work the wait method and then invoke the second thread. So right now its not working as its supposed to.

Class for thread1


class for thread2

 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!