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 a treeset class?
Explain wait() method of object class ?
How will you calculate the depth of a binary tree if the tree contains 15 nodes?
What does int argc char * argv [] mean?
What do you understand by private, protected and public?
How do you calculate square roots?
Explain when noclassdeffounderror will be raised ?
Is it possible to instantiate the abstract class?
What are the advantages of user defined functions?
What is a loop java?
Under what conditions is an object’s finalize() method invoked by the garbage collector?
4.1 Supply contracts (in the form of comments specifying pre- and post conditions) for the enqueue() method of the LinkedQueue class given in the Appendix. (2) 4.2 Let Thing be a class which is capable of cloning objects, and consider the code fragment: Thing thing1 = new Thing(); //(1) Thing thing2 = thing1; //(2) Thing thing3 = (Thing) thing1.clone(); //(3) Explain how the objects thing2 and thing3 differ from each other after execution of the statements. (
How will you reverse a link list without using recursion?
Explain about OOPS concepts and fundamentals.
What is the use of using enum to declare a constant?