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
Can we use a default constructor of a class even if an explicit constructor is defined?
What is derived datatype?
What Is Composition?
What do you mean by platform independence?
What is assembly used for?
How will you load a specific locale?
What is command line used for?
What are the topics in advance java?
Explain the overview of UDP messaging.
What is null in java?
What is map java?
What is the importance of finally block in exception handling?
What is substring in java?
What is a pointer and does java support pointers?
What are the two basic ways in which classes that can be run as threads may be defined?