I'm learning synchronized keyword in Java, but I didn't find example using it like this: what would happen if I synchronized on another class object
public class ClassA {
public static void hello() {
synchronized(ClassB.class) {
// do something
}
}
}