Overriding and return types

Overriding and return types

As we know that When a subclass wants to change the method implementation of an inherited method,
the subclass must define a method that matches the inherited version exactly.

An exact match means the arguments and return types must be identical.We know that overloaded methods can change the return type, but overriding methods cannot.

By:UMANG
Date:2004-03-09 00:00:00

Post Your Answers


User Email:

User Name:
Answers:

Related scjp1.5 chap6 Links

scjp1.5 chap6 interview questions and answers for experienced and fresher