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 rule of accessibility in java?

961


What is a flag value?

951


What are the characteristics of Final,Finally and Finalize keywords.

1123


what is interface in java? Explain

902


What is the difference between this() and super() in java?

977


What are methods in java?

940


which pattern is default in scanner package?

2185


What are the three parts of a lambda expression?

944


How does finally block differ from finalize() method?

997


What is the biggest integer?

994


What is the function of log?

944


I have multiple constructors defined in a class. Is it possible to call a constructor from another constructor’s body?

952


Why string is called as immutable?

887


Is java based on c?

935


What is java util collection?

996