Hi ,You have rights to overload main(),but jvm can invoke only main with String[] s. not other arguments main.If u come for override both sub class and super class can hold its own main. any way we can't invoke main with help of either object ref or super. but at compile time we can't get any error suppose both super and sub has main.
class Checkmain{ public static void main(String args[]){ args[1]="ashish"; System.out.println("hello "); } } class Checkmain1 extends Checkmain{ public static void main(String args[]){ System.out.println("how r u"); }
} class Jo{ public static void main(String args[]){ String S[]=new String[10] ;