Java.util.* is a built-in package in Java which encapsulates a similar group of classes, sub-packages and interfaces. The * lets you import a class from existing packages and use it in the program as many times you need.
You can find the list of all classes, interfaces, exceptions in the official document.
However, you are using only a few classes from the java.util package like below import java.util.ArrayList;
import java.util.LinkedList;
It’s better to specify them individually instead of importing the whole package as java.util.*