With Visual Studio Code In the Java source file, When saving Erase unused imports.
I found this setting, so make a note of it.
Java> Save Actions: Organize Imports
For Mac users You can find it by opening the configuration file with “Command + ,” and typing the search word with “Java import”.
By the way,
Organize is meant to be organized, and is said to be pronounced Organize. Here.
It means organizing, Not only erase unused imports, It seems that grouping and sorting will also be done.