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
When throws keyword is used?
Give me an example of array and linked list? Where they can be used?
What is thread start?
What is an infinite loop in java? Explain with an example.
What are the major drawbacks of external iteration?
What are static initalizers in java ?
What is the difference between heap memory and stack memory?
What are disadvantages of java?
What is arraylist e in java?
How can you share data between two thread in Java?
How can we break singleton in java?
Can we use different return types for methods when overridden?
How do you replace all in word?
What is a stringbuilder?
What is subsequence of a string?