it is said that the
Class.forName (String name, boolean initialize,ClassLoader loader) method can choose whether to initialize the class when loading the class
but when I set initialize to false, I still execute the static code block in the class. Why?
public class StringL {
static {
System.out.println("");
}
public static void main(String[] args){
ClassLoader loader = ClassLoader.getSystemClassLoader();
try {
Class sample3=Class.forName("StringL",false,loader);
}catch (ClassNotFoundException e){
e.printStackTrace();
}
}
}