ObjectgetClass public final Class<? extends Object> getClass() Returns the runtime class of an object. That Class object is the object that is locked by static synchronized methods of the represented class. Returns: The java.lang.Class object that represents the runtime class of the object. The result is of type Class<? extends X> where X is the erasure of the static type of the expression on which getClass is called.
public final Class<? extends Object> getClass()
Returns the runtime class of an object. That Class object is the object that is locked by static synchronized methods of the represented class. Returns:
The java.lang.Class object that represents the runtime class of the object. The result is of type Class<? extends X> where X is the erasure of the static type of the expression on which getClass is called.
说得很有道理
protected static Seq seq = null;
synchronized(Seq.seqclass){
Seq.XXX();
...........
}
这和protected static Seq seq = new Seq();
seq.XXXX();
有什么差别?