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

Explain about static nested classes in java?

1033


What is array and arraylist in java?

1059


What are scalar data types?

997


What are different types of control structures?

935


What are the new features in java 8?

984


In java, what is the difference between method overloading and method overriding?

1063


What happens when a thread cannot acquire a lock on an object in java programming?

964


Can we create an object of private class?

918


What are the steps in the jdbc connection?

968


What is the purpose of a volatile variable?

985


Why packages are used?

1405


What is Major and importance difference between for and foreach loop ?

1090


How do you do absolute value in java?

935


what is encapsulation in java? Explain

1058


What is final class?

969