A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Help with Object class
Arun kumar Maalik
Joined: Jul 04, 2006
Jul 04, 2006 11:07:00
would U tell me that why all(almost all) classes in
are derived from Object classes. Pls sugets me.
Arun kumar maalik
author and iconoclast
Joined: Jul 08, 2003
Jul 04, 2006 14:05:00
All classes, except for Object, extend exactly one other class. If you are defining a new class and you don't explicitly specify a parent class, then its parent is Object, by default.
Why? That's just how it works. Java has a "single-rooted" object inheritance tree, like Smalltalk or the old NIH class library for C++.
[Jess in Action]
subject: Help with Object class
Super class for all the classes in java
why we exteds object
class hierarchy in java
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2013