Saturday, May 30, 2015

Synchronized Keyword


  • This can only be used to methods.
  • If you use this keyword in a method, that indicate the method can be accessed by only one thread at a time.
  • You can use any of access modifiers to set access level.
Ex:-    public synchronized void DisplayDate( ) {   }

No comments:

Post a Comment