If you had a single class you needed to import, say java.util.Random, would naming it specifically in the import statement like
import java.util.Random;
use less memory than
import java.util.*;
And would this change if you were using multiple classes from java.util? How about if you were using all the classes in java.util?
If you had a single class you needed to import, say java.util.Random, would naming
Share
Imports are used only by the compiler. At runtime, the bytecode uses the fully qualified name of every class used. The bytecode is exactly the same whether you use * imports or not.