• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

I am also in elite group of SCJP-2.0

 
sundaram
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi Amit
Congrus.. please send ur material and sample question to
apaulraj@yahoo.com.I am trying my 2nd time first time by one question
I failed..
Thanks for ur help
sundara
 
Andrew Edmonds
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hmm, I found your 2nd Thread example very interesting. Would I be right in assuming that the synchronized method is a bit of a Red Herring. Since the two new Thread Objects have not called start() then they are not currently running Threads. Calling the run() methods of each Thread object is perfectly legal as they are JUST methods of the object, but they won't be running as part of their Threads. Therefore I assume we still have just the user Thread running and hence the two calls to run() will happen one after the other, not concurrecntly, hence the output.
If this is correct I can see how the Sun exam is really testing people, as these are not issues dealt with in the books, but something you really need to work out at the time using the knowledge you have.
Please reply if this is correct BTW.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic