JavaSyntax
Import a Class
Code example
import java.util.List;Imports a class from a package.
In Java, import a class: imports a class from a package — import java.util.List;
import java.util.List;import java.util.List;Imports a class from a package.
Use import java.util.List;.
Use this pattern: import java.util.List;
Yes. Use Copy code and adapt the example to your program.
No. The language syntax is the same across operating systems.