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
Program to Find the second largest element in an array.
Does java have extension methods?
What is Java Reflection API? Why it’s so important to have?
What is command line used for?
What are the drawbacks for singleton class?
Are arrays immutable in java?
What about anonymous inner classes in java?
When should you make a function static?
Is it possible to define a method in java class but provide it’s implementation in the code of another language like c?
Is null or empty java?
Can we override private methods?
What is the difference between logical data independence and physical data independence?
Explain the difference between runnable and callable interface in java?
What is the length of a string?
What is the difference between member variables initialization and assignment in a constructor?