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...

In Inheritence concept, i have a static method in super
class and i am inheriting that class to one sub class.in
that case the static method is inherited to sub class or
not????

Answer Posted / venkat.kanneganti

Hi,static methods are methods are inherited.
example
class A {
static void methA() {
System.out.println("inside methA");
}
}
class B extends A {
public static void main(String[] args){
B.methA();
}
}
output:inside methA

Is This Answer Correct ?    20 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the use of object and class classes?

1041


What is anagram number?

945


Why is method overloading not possible by changing the return type in java?

1002


What does next mean in java?

967


Give the hierarchy of inputstream and outputstream classes.

1098


What is an example of declaration?

1003


How infinite loop is declared?

1016


What mechanism does java use for memory management?

974


If an object is garbage collected, can it become reachable again?

993


Define how does a try statement determine which catch clause should be used to handle an exception?

1154


what is the purpose of "virtual"?

1082


Explain what access modifiers can be used for variables?

1056


What is a functional interface?

1016


Difference between character constant and string constant in java ?

1017


Which class is the superclass for every class in java programming?

994