Can we override static methods?
Answer Posted / amitasite
you cannot override static method from super class.
e.g.,
class SuperType{
public static void method(){
System.out.println("Super Static");
}
}
class SubType extends SuperType{
public void method(){
System.out.println("Super Static");
}
}
It will give compilation error : Instance method cannot
override static method from SuperType
Is This Answer Correct ? | 3 Yes | 1 No |
Post New Answer View All Answers
What is a nested list?
What is your platform?s default character encoding and how to know this?
Can java list be null?
Explain the overview of UDP messaging.
Will the jvm load the package twice at runtime?
Is sizeof a keyword in java programming?
Does constructor return any value?
What is string syntax?
What restrictions are placed on method overloading in java programming?
why would you use a synchronized block vs. Synchronized method? : Java thread
Can we sort a map in java?
What are the types of relation?
what r advatages of websphere? & how to deploy?
What is a line separator in java?
how can you take care of mutual exclusion using java threads? : Java thread