As I know, every class has a Class
object. There is one case when I use synchronize, for example:
public class A {
public static void main(String... args){
synchronize(A.class){
//do something...
}
}
}
This will lock A
's Class
object, right? When is this Class
object created? Is it created when the JVM loads the A
class or when I call A.class
? I can't find detail in JLS, could someone please provide the link about it?