File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Beginning Java and the fly likes important package Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "important package" Watch "important package" New topic

important package

pravanya Gullapudi

Joined: May 07, 2007
Posts: 16
i know that java.lang is an important package. why it is important?
Kaydell Leavitt
Ranch Hand

Joined: Nov 18, 2006
Posts: 689

java.lang is the only package that is automatically included into each and every one of your java source-code files. The code that is in the java.lang package is the code that Sun believes is the most generally useful code.

Ernest Friedman-Hill
author and iconoclast

Joined: Jul 08, 2003
Posts: 24199

Adding to that, java.lang also contains a number of classes that have special language support, are integral to the VM implementation, or are "magic" in some other way. For example, java.lang.Object, the ultimate superclass of every other class, which has no superclass itself; java.lang.String, the only class with language support for literal values; Class and Classloader, without which no other classes can be brought into the JVM; StringBuffer/StringBuilder, which the compiler uses to implement the "+" operator for Strings; etc.

[Jess in Action][AskingGoodQuestions]
I agree. Here's the link:
subject: important package
It's not a secret anymore!