users
[Top] [All Lists]

difference between import java.util.*; and import java.util.Vector;

To: <users@xxxxxxxxxx>
Subject: difference between import java.util.*; and import java.util.Vector;
From: "Arnett, Matt" <Matt.Arnett@xxxxxxxxxx>
Date: Wed, 11 Jun 2003 11:44:12 -0400
Delivered-to: mailing list users@cinjug.org
Mailing-list: contact users-help@cinjug.org; run by ezmlm
Thread-index: AcMwME4smCKWN/N4SLCEQzADSXJf+g==
Thread-topic: difference between import java.util.*; and import java.util.Vector;

What are the functional reasons and personal reasons that you explicitly list all imported classes such as:

import java.util.Vector;

import java.util.Hashtable;

import java.util.Date;

versus using a package.*; import statement such as:

import java.util.*;

 

Is it just a personal preference to using one or the other?

Have you found it more helpful to list out all the classes for documenting purposes?

What (if any) impact does it have on the size of the class files that are generated?  (my guess is none except for the several additional import lines)

Does it affect the runtime performance or amount of memory used for the classes/jvm?

Is the main purpose of explicitly importing specific classes to help avoid namespace clashes?

 

Thanks,
-Matt

<Prev in Thread] Current Thread [Next in Thread>