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
Objects or references which of them gets garbage collected?
What is entry set in java?
can used Protected Class outside Function.?
Why is java so important?
Write java program to reverse string without using api?
How are this() and super() used with constructors in java programming?
Why runnable interface is used in java?
What is constructor in java ?
How do you override a method?
what is mutual exclusion? How can you take care of mutual exclusion using java threads? : Java thread
What is the maximum size of list in java?
What are different access specifiers in java? Explain
In a class implementing an interface, can we change the value of any variable defined in the interface?
is there a separate stack for each thread in java? : Java thread
What is the internal implementation of set in java?