Java Synchronized function

Posted by leon on Stack Overflow See other posts from Stack Overflow or by leon
Published on 2010-04-26T09:28:01Z Indexed on 2010/04/26 9:33 UTC
Read the original article Hit count: 220

Filed under:
|

Hi I have a question. In the following code, if a thread were blocked at wait statement, and another thread attempts to execute foo(), would the hello wolrd message be printed? and Why? Many Thanks

synchronized foo(){

system.out.println("hello world"); ..... wait(); .....

}

© Stack Overflow or respective owner

Related posts about concurrency

Related posts about java