What is the difference between overloading and overriding a
function?
Answer Posted / praveen
Over riding also can be happens in the same class
eq :-
public void test(int i)
{
System.out.println(i);
}
public void test(String i)
{
System.out.println(i);
}
Over Loading - Compile time polymorphism
Over Riding - Run time polymorphism
| Is This Answer Correct ? | 5 Yes | 3 No |
Post New Answer View All Answers
How many types of classes are there in java?
What is a ternary operator in java?
Can we override compareto method?
Why we used vector class?
What is difference between path and classpath in java?
In java, how many ways you can take input from the console?
How to sort an unsorted array in java?
Why set is used in java?
What is reflexive association?
What is purpose of applet programming?
What if constructor is protected in java?
What are the different types of inner classes?
What is difference between synchronize and concurrent collection in java?
Explain the init method?
what do you mean by classloader?