This week's book giveaway is in the
We're giving away four copies of
and have Sam Newman on-line!
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
this week in the
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]
Have you checked out
subject: Help with Object class
class hierarchy in java
why we exteds object
Super class for all the classes in java
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2015