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 a generic type?

564


what is synchronization and why is it important? : Java thread

588


What is difference between module and function?

541


Can a class have multiple subclasses?

586


How do you add an arraylist to an array in java?

511






Why inputstreamreader is used in java?

550


What are the four corner stones of oop?

547


What are different types of multitasking?

547


Is singleton a bad practice?

577


Why is string class considered immutable?

598


For class CFoo { }; what default methods will the compiler generate for you>?

620


What is array class in java?

596


explain the concept of virtual method invocation in polymorphism in detail?

1717


What is private protected in java?

550


Which is bigger float or double java?

525