| Author |
important package
|
pravanya Gullapudi
Greenhorn
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: 679
|
|
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. Kaydell
|
 |
Ernest Friedman-Hill
author and iconoclast
Marshal
Joined: Jul 08, 2003
Posts: 24059
|
|
|
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]
|
 |
 |
|
|
subject: important package
|
|
|