• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

synchronization query

 
shital sonavane
Greenhorn
Posts: 20
Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
Please clear my query.

suppose i have one class which contain two methods a() and b() from which a() is static synchronized and b() is non static , synchronized.
Now my one thread is trying to access both the methods at same time. how the code will behave???

Thanks in advance.
 
Stephan van Hulst
Bartender
Pie
Posts: 4826
34
Chrome Netbeans IDE Windows
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you have one thread, it can't access both methods at the same time. Do you mean that one of the two methods is called from the other method?
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic