I saw a piece of code that goes like public class SomeClass extends Object implements java.io.Serializable Are there some benefits to explicitly state "extends Object" that I might overlook? [ January 05, 2003: Message edited by: Mapraputa Is ]
Was it in a textbook? Some texts just do that to reinforce the concept that all classes ultimately inherit from Object. It seems to me that Bill Brogden put a statement in ExamPrep Java 2 why he did that, but I can't find it now that I'm looking for it.
JavaBeginnersFaq "Yesterday is history, tomorrow is a mystery, and today is a gift; that's why they call it the present." Eleanor Roosevelt
Also many IDEs have class wizards that will automatically generate this sort of crap for you. I think it's really only useful for making the situation more obvious to people who barely understand Java (who nonetheless may be expected to maintain your code because a company is too cheap to emply real programmers :roll: ).
"I'm not back." - Bill Harding, Twister
Leverager of our synergies
Joined: Aug 26, 2000
Almost textbook, it's a book for beginners. I thought that such extending would only confuse the reader, since this is never done anywhere else[corrected after reading Jim's comment. Ha, so maybe this sort of crap will help to understand IDE-generated code? ] and that all classes extend Object by default isn't such a difficult idea to grasp... [ January 05, 2003: Message edited by: Mapraputa Is ]