I went through an interview recently and they ask me two questions in core Java.
Q 1.
Can we write a java class with:
public s
Yes, we can write main method with a return type other than void. This simply means that we can overload our main method. Some examples are
public static void main(String ... x){ }
public static int main(String []args){ }
public static void main(string array[]){ }
But, note here that the compiler will only know
public static void main(String []args){ }
If above method is not present it will not compile.