The specific code is as follows, why every acquisition related to the array is public, abstract, final
Class doubles = Class.forName("[D");
System.out.printf("Modifiers:%n %s%n%n", Modifier.toString(doubles.getModifiers()));
Class doubles2 = Class.forName("[[D");
System.out.printf("Modifiers:%n %s%n%n", Modifier.toString(doubles2.getModifiers()));
Class Foo = Class.forName("[Ljava.lang.String;");
System.out.printf("Modifiers:%n %s%n%n", Modifier.toString(Foo.getModifiers()));
Is that why ??
迷茫2017-05-17 10:08:18
The class corresponding to the array is generated by the JVM, so this strange phenomenon of abstract final occurs. Final prevents inheritance, and abstract prevents the creation of instances (in fact, it does not even have a constructor)