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

What is ioc concept?

0 Answers  


What is daemon thread?

3 Answers  


Different between Struts and Spring? or Why use Spring, if you are already using Struts?

3 Answers   HP,


how can we load a file of a user in the database table?

3 Answers   ITC Infotech,


Why threads will block on I/O?

2 Answers  


What are the types of data passing mechanisams under JMS specification?

1 Answers  


list the types of dialodg

1 Answers   Wipro,


In RMI, inorder to sent the stub reference to the client, is we have to load the server object first into the memory or can we directly sent reference to the client?

0 Answers  


What is a tasks priority and how is it used in scheduling?

0 Answers  


hi friends, i have done my BE(CSE)at 2011 then i have joined one company before they asked me 50k so i paid but now they telling no project here so we r going to close like that so now i need any job i have good knowledge in core java and j2ee(jsp,servlet,jdbc) so if u know any job pl help me

0 Answers   Infosys,


Why DOM Parser would take more Memory than SAX parser while they are parsing?

3 Answers   OnMobile,


how to create Calculator GUI using Gridbaglayout as like as Window Calculator??????????? (Open calculator Go-->Run-->type calc-->Enter)

1 Answers   TCS,


Categories