File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Beginning Java and the fly likes call non-synchronized method within synchronized method  (or) synchronized block? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "call non-synchronized method within synchronized method  (or) synchronized block?" Watch "call non-synchronized method within synchronized method  (or) synchronized block?" New topic
Author

call non-synchronized method within synchronized method (or) synchronized block?

kri shan
Ranch Hand

Joined: Apr 08, 2004
Posts: 1367
Can i call non-synchronized method within synchronized method ?

synchronized int A() {
B();

}

int B() {

}

(or) Can i call non-synchronized method within synchronized block ?
Henry Wong
author
Sheriff

Joined: Sep 28, 2004
Posts: 18103
    
  39


Sure... why not?


Books: Java Threads, 3rd Edition, Jini in a Nutshell, and Java Gems (contributor)
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: call non-synchronized method within synchronized method (or) synchronized block?
 
Similar Threads
Synchronized calling non-synchronized
Volatile - synchronized ?
synchronized block
synchronized - wait()