When we import a class in another class, does this increase the size of the java file in which we are importing the file. what kind of performance difference it causes.
An import statement enables you to refer to a class by the shortened form of its name("ArrayList") versus having to refer to it via its fully qualified name ("java.util.ArrayList"). That is, the following two classes are equivalent:
Also note that the Java Virtual Machine's class loader is a "just in time" loader, meaning that it only loads the bytecode for a class into its memory when you first need it at run time -- i.e., the first time you instantiate an object of a particular type. Please see comments below.