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 java’s garbage collected heap?

712


Explain parallel processing in java8?

877


What is a method in programming?

849


How do you compare objects in java?

687


What is a null check?

745


What are the advantages of compiled language?

791


Explain about the interpreter in java?

822


Is it possible to define a method in java class but provide it’s implementation in the code of another language like c?

794


How to run a JAR file through command prompt?

929


Difference between start() and run() method of thread class?

796


Write a program to solve producer consumer problem in java?

750


What is mutable object and immutable object?

860


What is sleep method?

802


Explain about static imports in java?

764


How to sort list of list in java?

860