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 / mariyappan

overloading is the process of defining the same function
with different parameters.which can be defined within class.
overriding is the process of defining the function name in
the more than one classes.

Is This Answer Correct ?    2 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the purpose class.forname method?

560


a thread is runnable, how does that work? : Java thread

513


Does substring start with 0?

556


Can we make main() thread as daemon?

578


Explain the use of volatile field modifier?

635






Can I declare class as static or private?

545


When should you use arraylist and when should you use linkedlist?

496


4.1 Supply contracts (in the form of comments specifying pre- and post conditions) for the enqueue() method of the LinkedQueue class given in the Appendix. (2) 4.2 Let Thing be a class which is capable of cloning objects, and consider the code fragment: Thing thing1 = new Thing(); //(1) Thing thing2 = thing1; //(2) Thing thing3 = (Thing) thing1.clone(); //(3) Explain how the objects thing2 and thing3 differ from each other after execution of the statements. (

1416


What is tostring () method?

546


What are the 8 primitive data types in java?

549


What is the meaning of 3 dots in java?

682


Explain hashset and its features?

583


Why string is not a wrapper class?

646


Is minecraft java edition free?

578


Is constructor inherited?

532