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


Please Help Members By Posting Answers For Below Questions

What is the difference between heap memory and stack memory?

613


What is the use of accept () method in java?

606


What is the difference between array and array list in java?

603


Is set ordered in java?

570


enlist some features of jdk.

553






Can list have duplicates in java?

519


What is style and indentation?

550


What is a method in programming?

630


Is singleton class immutable?

538


What’s a deadlock?

607


Is array serializable java?

515


What is the technique adopted to create an immutable class?

522


How can we pass argument to a function by reference instead of pass by value?

582


Why synchronization is important?

584


How do you call a reference in java?

515