Suresh Regmi wrote:Yes Roel,, just to Rephrase it with the exception for primitive data types.
In my opinion it's not really necessary, because it's already in the statement, maybe not that obvious.
The rule clearly states that the return type must be the same or a subclass. And as you know primitive data types are not classes, so subclasses only apply for objects (non primitive data types). So for primitives it must be the same.