• Post Reply Bookmark Topic Watch Topic
  • New Topic

Error: program is Executing with no Output !!  RSS feed

 
vishal mishra
Ranch Hand
Posts: 103
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Aim of this program is to print 100 times A, 100 times B and 100 times C in asynchronized manner by changing the content of StringBuffer object.

Program compiles with no error.But on executing program executes without producing any output. Means on giving command

c:\>java p1.Synche

error -: it executes blank and terminates.



Program below creates three instances of "My" class which is subclass of Thread class and these three instances share one StringBuffer object.





Please help me in debugging this program .
Thanks in advance.
 
Stuart A. Burkett
Ranch Hand
Posts: 679
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What do you think line 6 and 7 are doing ?
 
Greg Brannon
Bartender
Posts: 563
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
To help you better understand the reason for Stuart's question, I recommend you review this tutorial page.
 
Campbell Ritchie
Marshal
Posts: 56584
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And careful about spelling, please. Do you mean “asynchronized manner” or “a synchronized manner”?
 
vishal mishra
Ranch Hand
Posts: 103
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Got it !! Thanks !!
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!