Editorial / Best Answer
ashish_setia
check out this example
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] ;
Checkmain.main(S);
Checkmain1.main(S);
}}
Can we override the main method?
Editorial / Best Answer
ashish_setiaProfile Answers by ashish_setia Questions by ashish_setia
check out this example
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] ;
Checkmain.main(S);
Checkmain1.main(S);
}}