Was experimenting with interface inheritance and found this:
interface String{}
interface Object{}
interface Exception{}
interface Integer extends String, Object, Exception{}
public class Test implements Integer{
public static void main(String[] args) {
System.out.println("Test");
}
}
it’s compiling, but throws "main" java.lang.NoSuchMethodError: main at runtime?
That’s because main method signature should be:
if you write
it gets an array of your String interfaces, so the signature is different