Java.lang package provides classes that are fundamentally required by the Java programming language.Object,Class,Wrapper
Classes,System classes,Runtime classes,String,Exception classes are
imported automatically to perform basic behavior of Java Language.
Object class is the root of the class hierarchy, and Class, instances of which represent classes at run time.
It is required at run time that primitives be acted as Objects , so wrapper classes are included in it.
String and StringBuffer classes provide commonly used operations on character strings.
Classes ClassLoader, System, Process, Runtime provides "system operations" that manage the dynamic loading of classes, creation of external processes, host environment,garbage collection.
Exception and Error classes which are the child of Class Throwable represents objects which are thrown during error condition.
So, basic programming can be done using classes present in java.lang packages, that's why it is imported autmatically.
Reference : http://docs.oracle.com/javase/1.4.2/docs/api/java/lang/package-summary.html
Object class is the root of the class hierarchy, and Class, instances of which represent classes at run time.
It is required at run time that primitives be acted as Objects , so wrapper classes are included in it.
String and StringBuffer classes provide commonly used operations on character strings.
Classes ClassLoader, System, Process, Runtime provides "system operations" that manage the dynamic loading of classes, creation of external processes, host environment,garbage collection.
Exception and Error classes which are the child of Class Throwable represents objects which are thrown during error condition.
So, basic programming can be done using classes present in java.lang packages, that's why it is imported autmatically.
Reference : http://docs.oracle.com/javase/1.4.2/docs/api/java/lang/package-summary.html
Nice post Chandraprakash and thanks for commenting on my blog post Why String is immutable in Java I see you have also started a good blog keep it up.
ReplyDeleteThanks
Javin
Top 15 multi-threading Interview Questions in Java