Click to See Complete Forum and Search --> : extends Object explictly specified
Brad Cadle
February 7th, 1999, 05:15 PM
Why is it I have seen some code (most notably in the Microsoft Visual j++ source book by Cross and Saganich) that has in a class defintiion extends Object explicitly defined when according to thinking in Java, all java classes implicitly extend Object anyway?
-Brad
brad Cadle
February 7th, 1999, 05:15 PM
Why is it I have seen some code (most notably in the Microsoft Visual j++ source book by Cross and Saganich) that has in a class defintiion extends Object explicitly defined when according to thinking in Java, all java classes implicitly extend Object anyway?
-Brad
Zafir Anjum
February 7th, 1999, 05:49 PM
There could be two reasons.
1. The author probably have a strong C++ background and feel more comfortable
always specifying the base class.
2. They want to highlight the fact that the new class has a close relationship
with the Object class and that it may actually be overriding some of the Object
methods.
I haven't read the book. This is just speculation.
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.