E.g. Synchronizing a function:
public synchronized void Method1 () {
// Appropriate method-related code.
}
E.g. Synchronizing a block of code inside a function:public myFunction (){
synchronized (this) {
// Synchronized code here.
}
}
A COMPLETE GUIDE OF JAVA PROGRAMMING, OOPS, AOP, COLLECTION, JDBC, THREAD, REFLECTION, SERVLET, JSP, JSF, JPA, EJB, STRUTS 1 & 2, SPRING, HIBERNATE, LOG4J, ANDROID, SQL, INTERVIEW QUESTIONS, JAVASCRIPT, ERROR, EXCEPTION AND BEST PRACTICES.
No comments:
Post a Comment