aruna sameera wrote:why JVM load java.lang packages by default?
Because the classes in java.lang are used so frequently.
So as to make things easier for users.
what are other packages by default loaded by the JVM?
The current package that the class with the main method is in.
All other packages need to be named by imports, or fully-qualified names. Packages not in the current directory structure or the standard Java installation need to be added to the classpath, preferably with the -cp tag (here shown for "java.exe" on Windows).