Synchronized blocks place locks for shorter periods than synchronized methods.:I guess, synchronized block or synchronized methods are depends on the user requirements. :First of all to achieve Multithreading mechanism in java we should go for synchronization. And this can be done in two ways depending on the requirement. :There is not a clear advantage of using synchronized method over block.:in some times only some part of the method doesn&
Category:Core Java Interview Questions
No comments:
Post a Comment