File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Beginning Java and the fly likes does import statement increase the size Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "does import statement increase the size" Watch "does import statement increase the size" New topic
Author

does import statement increase the size

Saurabh Dixit
Greenhorn

Joined: Jul 18, 2005
Posts: 6
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.
Steve McCann
Ranch Hand

Joined: Oct 20, 2004
Posts: 81
The import statement does nothing more than allow you to refer to a class without having to use the fully qualified name.
e.g.

or
Jacquie Barker
author
Ranch Hand

Joined: Dec 20, 2000
Posts: 201
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.

I hope this helps!

Jacquie


Author of Beginning Java Objects, Beginning C# Objects, and Taming the Technology Tidal Wave
Saurabh Dixit
Greenhorn

Joined: Jul 18, 2005
Posts: 6
Thanks jacquie and steve. My doubts have been cleared.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: does import statement increase the size