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 does the “final” keyword mean in front of a variable? A method? A class?
What does microservices mean?
How do you sort an array in java?
Where are local variables stored?
Can you declare an interface method static?
What is exception handling in java?
Can we declare array without size in java?
What is string pooling concept?
What are the four integer types supported by java?
What does function identity () do?
How do you reverse a string in java without using string buffer?
What is a nullable field?
What does percent mean in java?
What are unchecked exceptions in java?
What do you mean by synchronized non access modifier?