Aliased Imports
When importing declarations with the same name from different packages, you can use the import ... as syntax to rename them and avoid naming conflicts. Even without conflicts, aliases can simplify overly long type names.
After renaming, the declaration can only be accessed through the new name; the original name is no longer available. This is a safety mechanism to prevent the same declaration from appearing with different names in the code, causing confusion.
The code on the right shows how to rename ArrayList and HashMap to the shorter names List and Map. This is particularly useful when frequently using certain collection types.
Try changing List back to ArrayList and observe what error the compiler reports. This shows that the original name is no longer available after aliasing.