HI
1: Yes: we can overload the main() because overloading is the compile time polymorphism, we can put main() with different type of argument in main.
for Exp.
public class MainOverload{
public static void main(){
System.out.println("I am main method without any parameter!");
}
public static void main(String[] strArgs){
main();
}
}
2: Yes we can write a program without using main(), use of static block.
java teacher
Dec 16, 2010