Hi guys/gals, Can anyone give me a good reason as to why you'd want to extend Object? I've seen some examples that do this, but don't all classes end up inherting from Object anyway? So why would one want to do this? /rick
We don't explicitely extend Object. When you compile (with javac) and decompile (with javap), what you get is the following:
So you can see that the compiler adds the "extends java.lang.Object" and the default constructor by itself. So, the compiler does some job for you but it doesn't hurt to do it yourself... for clarity purposes...
Thanks Brian and Valentin That's what I thought. So it is safe to say that it doesn't provide any extra functionality to us. Mostly for clarity purposes... /rick