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
Define a package.
Is nullpointerexception checked or unchecked?
Where is java located?
What is a instance variable in java?
How do you start a new line in java?
How many unicode characters are there?
What causes memory leaks in java?
How to create an immutable class?
What is a jit compiler?
What is private static in java?
How objects of a class are created if no constructor is defined in the class?
What is the advantage of preparedstatement over statement?
Can an interface be final?
What is the meaning of variables in research?
In a container there are 5 components. I want to display the all the components names, how will you do that one?