This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Thread Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Thread" Watch "Thread" New topic
Author

Thread

Abhi vijay
Ranch Hand

Joined: Sep 16, 2008
Posts: 509
Source : Devaka Cooray's Exam Simulator




Here System.out.print("Printed, ");
this line is not executed???
Ruben Soto
Ranch Hand

Joined: Dec 16, 2008
Posts: 1032
Hi Abhi,

I performed some modifications to the code that should allow you to see what's going on. Try to run this:



All code in my posts, unless a source is explicitly mentioned, is my own.
Abhi vijay
Ranch Hand

Joined: Sep 16, 2008
Posts: 509
Thanks.Ruben. I understood. I am really nervous, as I am making a lot of mistakes in the Thread questions.
Ruben Soto
Ranch Hand

Joined: Dec 16, 2008
Posts: 1032
Threads questions are tough for everyone. If you now understand why the code wasn't working as you expected, that means you understand threads quite well though.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Thread
 
Similar Threads
wait() method question
Question about wait() method
Thread question doubt
wait() not syncronized on this but not throwing illegalMonitorStateException
Thread question