java虚拟机双亲委派机制加载模型的疑问
```
public class Main {
public static void main(String[] args) {
new String();
}
}
class String {
public String() {
System.out.println("test loader");
}
}
public static void main(String[] args) {
new String();
}
}
class String {
public String() {
System.out.println("test loader");
}
}
```
为什么会报错找不到main函数?
Error: Main method not found in class Main, please define the main method as:
public static void main(String[] args)
or a JavaFX application class must extend javafx.application.Application
public static void main(String[] args)
or a JavaFX application class must extend javafx.application.Application