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
What are peerless components in java programming?
Why is stringbuffer faster than string?
What will happen when using pass by reference in java?
What are the three parts of a lambda expression? What is the type of lambda expression?
What is the flag in java?
What is the difference between exception and error in java?
Which class should you use to obtain design information about an object in java programming?
What is size_t?
What is a class reference?
What do you understand by synchronization?
what are Hostile Applets?
Is null keyword in java?
What is exception hierarchy in java?
What is java ceil?
Does every java program need a main?