On Apr 15, 11:04 pm, "Jon Carlson" <[email protected]> wrote: > I apologize for asking this at this point in the course, but I was wondering > about the "import" statement and why we only import only what we need in a > package as opposed to just importing the whole package? For example: > > Import java.util.date vs jave.util.* I think which to adopt is up to the writer's preference. There are also reasons in which way to write. If a class would like to use Date only, then import Date only. Like: import java.util.Date; Otherwise, if a class would like to use Collection, List, ArrayList, Iterator, & Date, then it is more economical(in terms of typing) to import the whole directory. Like: import java.util.*;
Feel free to correct me if I am wrong. > > Thanks. > > Jon Carlson P.E. > > Engineering Director > > CC Technics, Inc. > > 253-250-1600 cell > > 253-473-9295 office > > 253-476-2712 fax > > <mailto:[email protected]> [email protected] > > <http://www.cctechnics.com>www.cctechnics.com > > DISCLAIMER: > > This message is confidential, intended only for the named recipient(s) and > may contain information that is privileged or exempt from disclosure under > applicable law. If you are not the intended recipient(s), you are notified > that the dissemination, distribution or copying of this information is > strictly prohibited. If you received this message in error, please notify > the sender then delete this message. --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/javaprogrammingwithpassion?hl=en -~----------~----~----~----~------~----~------~--~---
