Difference between overloading and Overriding. <Giving a
confusing example to test the concept.>
(also asked in PA Consultancy Group,iflex,Value
chain,IBM,CTS,Accenture, Tarang>
Answer Posted / varun
overloading : can only be done by changing the type or no.
of parameters for eg:a(int a);
a(int a,int b);
while in case of overriding we can give new definition
without changing the parameters.
Is This Answer Correct ? | 20 Yes | 8 No |
Post New Answer View All Answers
What is the difference between heap memory and stack memory?
What is the use of accept () method in java?
What is the difference between array and array list in java?
Is set ordered in java?
enlist some features of jdk.
Can list have duplicates in java?
What is style and indentation?
What is a method in programming?
Is singleton class immutable?
What’s a deadlock?
Is array serializable java?
What is the technique adopted to create an immutable class?
How can we pass argument to a function by reference instead of pass by value?
Why synchronization is important?
How do you call a reference in java?