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

Answer Posted / kiran sangeri

no,bcos look at below code

package test;

class A {
static void something () {
System.out.println("class A");
}
}

class B extends A {
static void something () {
System.out.println("class B");
}
}


public class ClassC {

/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
A anA = new B ();
anA.something ();
}

}

Output : class A

so Class A is not been overridden.

Is This Answer Correct ?    6 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why use a datasource when you can directly specify a connection details? (in a J2EE application)

4340


Explain what is orm?

1147


why static class in java

1815


What is Remote Server?

2251


Is it possible to stop the execution of a method before completion in a sessionbean?

1145


How task's priority is used in scheduling?

2337


Name the eight primitive java types.

1196


what is a non-repeatable read?

2518


What is the diffrence between a local-tx-datasource and a xa-datasource?

1101


Do I have to use jsps with my application?

1065


what are memory considerations of jsp compares to other web components?

6585


Java is fully object oriented languages or not?

1071


Why is actionform a base class rather than an interface?

1113


What is message driven beam?

1117


Write a program to show synchronization?

1206