Can we override static methods?
Answer Posted / rambabu
Yes, We can! see Below---
public class Final1 {
public static void mone() {
System.out.println("Iam in final method of
super class");
}
}
public class Final extends Final1{
public static void mone() {
System.out.println("Iam in final method of
sub class");
}
public static void main(String a[]) {
Final f = new Final();
f.mone();
}
}
| Is This Answer Correct ? | 0 Yes | 8 No |
Post New Answer View All Answers
Can we declare an interface as final?
How you can force the garbage collection?
If an object is garbage collected, can it become reachable again?
Explain about main() method in java ?
What is a null check?
What is not thread safe?
What are disadvantages of java?
What is basic syntax?
How do you detect memory leaks?
What are scriptlets?
What are the advantages of functions?
Explain what is encapsulation?
What are the topics in advance java?
Does java support multiple inheritances?
What a static class can contains?