File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Beginning Java and the fly likes need help urgently Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "need help urgently" Watch "need help urgently" New topic
Author

need help urgently

Sridhar Garimella
Ranch Hand

Joined: Feb 18, 2000
Posts: 73
Hello Friends,
I have following doubts.
1) Why did java designers make Object class as super class to every class? Any specific reaons?
2) Why did java designers provide java.lang package by default? Any specific reasons?
Thanks for the help,
Sridhar Garimella.


Thanks,<br />Sridhar.
inam paki
Greenhorn

Joined: Jul 30, 2002
Posts: 14
Hi garimella
1) In my opinion Object class actually provides a mechanism to handle any kind of Object polymorphically.
Or in simple words You can say that it acts as the most common handle/reference an object can get
So you can deal different objects in same category.
2) java.lang package contains all the classes a user's class may need without importing any other package. This prevents any beginner to be confused in packages.


inampaki
Cindy Glass
"The Hood"
Sheriff

Joined: Sep 29, 2000
Posts: 8521
1) Because in an object oriented language "evereything" is supposed to be an "object". Of course primitives are an exception to this rule in Java, for efficiency reasons.
2) Sun provides LOTS of libraries that we can use. The java.lang package is just ONE of these provided in the jre. They did this because they are REALLY good at coding java , and they wanted some control over the way the basic functionality of the language grew and was implemented.


"JavaRanch, where the deer and the Certified play" - David O'Meara
Jamie Robertson
Ranch Hand

Joined: Jul 09, 2001
Posts: 1879

1) A little explanation from Sun
Jamie
corrected URL tag
[ July 30, 2002: Message edited by: Frank Carver ]
Sridhar Garimella
Ranch Hand

Joined: Feb 18, 2000
Posts: 73
Hello Friends,
I'm extremely sorry for posting same question in different forums. I won't repeat the same in future.
Thank you very much for your replies.
Regards
Sridhar
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: need help urgently