I asked myself why we didn't import a package while we use String functions such as toUpperCase()? How they get in there without importing packages?
Why we don't import a package while we use String functions?
java;packages
Java tutorials > Learning the Java Language > Packages:For convenience, the Java compiler automatically imports three entire packages for each source file: (1) the package with no name, (2) the java.lang package, and (3) the current package (the package for the current file)...Class String is in java.lang package, hence it is imported automatically per above rule.