Can we override static methods?
Answer Posted / yogesh gandhi
Neha,
I didn't get your answer.
You can overload as well as override static methods, but
only with static methods.
I have tried it and it is getting compiled.
Example is here.
*********************************************************
public class abc
{
public static void main(String args[])
{
}
public static void trss()
{
}
public static void trss(int i)
{
}
}
*********************************************************
Is This Answer Correct ? | 13 Yes | 1 No |
Post New Answer View All Answers
What is the function of static in java?
What is composition in java?
Does substring start with 0?
Differentiate between nested and inner class in java.
Explain the difference between comparator and comparable in java?
What is immutable state?
Can we pass a primitive type by reference in java? How
How do you declare an array in java?
Are variables stored in ram?
What are scalar data types?
Can we restart a dead thread in java?
Explain methods specific to list interface?
What is the difference between method overriding and overloading?
Can a hashset contain duplicates java?
Is alive method in java?