No, only the types contained by
java.lang are imported by default.
The concept of importing is not very difficult: if you want to refer to a type by their simple name, you must import them.
Example:
In this example, both
String and
ArrayList are referred to by their simple name, so they need to be imported.
String is imported automatically because it's in
java.lang.
ArrayList needs to be imported explicitly.
Here are two examples where you don't have to import
ArrayList:
In the first example, you referred to
ArrayList by its fully qualified name, not its simple name.
In the second example, you didn't refer to the
ArrayList class by name at all.