• Post Reply Bookmark Topic Watch Topic
  • New Topic

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

 
kri shan
Ranch Hand
Posts: 1481
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 22530
109
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Sure... why not?

 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!