Interesting Facts – Java

Synchronizing Static Methods class X{ public static synchronized void doSomething(){ } } Have you ever wondered what will happen if you call X.doSomething() from different threads in java? Will this method be synchronized? The answer is "yes". What happens here is, the class will be locked instead of an object (which is the familiar case to us).... Continue Reading →


Powered by

Up ↑

%d bloggers like this: