what is overloading and overriding with example?

Answer Posted / rajesh r

OVERLOADING MEANS SAME METHOD NAME WITH DIFFERENT
PARAMETERS.
BOTH SHOULD BE DEFINED IN SAME CLASS ITSELF.

OVERRIDING MEANS SAME METHOD NAME WITH SAME PARAMETERS.THIS
CAN ASSOCIATED IN A CLASS AND ITS SUBCLASS.(VIRTUAL,
OVERRIDE)

Is This Answer Correct ?    4 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what is the constructor and how many types of constructors are used in java?

531


How is hashset defined in java?

517


Is heap stored in ram?

522


How to pass arraylist to stored procedure in java?

544


What is the purpose of skeleton and stub?

584






How to reverse string in java?

613


What is the integer of 16?

533


Why are getters and setters used?

567


how do I create a runnable with inheritance? : Java thread

505


How does arrays sort work in java?

597


What are the different tags provided in jstl?

547


Why unicode is important?

463


What happens if we override private method?

521


Is .net better than java?

552


What is use of set in java?

488