Why we do not import a package while we use any string function?



The String class belongs to the java.lang package. This is the default package of the Java language therefore it is not mandatory to import it to use its classes.


Advertisements