mercredi 20 avril 2016

Why do Number class have an intValue() of Number even if the output would be same across the subclasses So what is the need of overriding it?

Why does Number Class have an abstract methods intValue(),longValue() etc, even though Numbers are expected to return int or long etc? Why can't they have already implemented methods?

Aucun commentaire:

Enregistrer un commentaire