Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


can a static method be overridden

Answers were Sorted based on User's Feedback



can a static method be overridden ..

Answer / aswini de

public class Test extends Test2{

public static void main(String args[]){
String str="";
int b=Test.cal(4);
System.out.println(b);
Test t =new Test();
t.displayX();
}

public static int cal(int a){
int b=a*a;
return b;
}

}

public class Test2 {
public static void main(String args[]){

}

public static int cal(int a,int b){
int c=a*b;
System.out.println("IN Super orerriden
methods:");
return c;
}

public void displayX(){
System.out.println("HI i am in Super");
}

}
my Sub Class is Test extends Test2 Class
Common static method is cal()

its run properly. No compile error , NO runtime error

Is This Answer Correct ?    4 Yes 38 No

Post New Answer

More Advanced Java Interview Questions

the same information whether it will connect to the database or it will be used previous information?

0 Answers  


What is aop(assepct oriented programing)?

0 Answers  


What is an abstract method?

0 Answers  


What is Introspection?

2 Answers  


what is Bootstrap loader program?

1 Answers   Rossell Techsys,


Is System.err.println(""Statement"); is execute the output on console . Example: System.err.println("Hello JAVA");

8 Answers  


Can I run seam with jdk 1.4 and earlier?

0 Answers  


what is diff between Access modifier and specifier?

5 Answers   L&T,


What is ioc concept?

0 Answers  


Differences between applications and applets?

3 Answers  


why static class in java

0 Answers   Infotech, SunGard,


how i secure my site with the https protocol.what are the steps?

0 Answers  


Categories