Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 2 of 2

Thread: Meaning of Java Packages

  1. #1
    Junior Member
    Join Date
    Feb 2011
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Meaning of Java Packages

    What do java packages do? I am using eclipse and it says best not to use the default package, but I haven't got any other packages. And how come in NetBeans, it creates a package with the same name as my project name and Eclipse names it default package?


  2. #2
    mmm.. coffee JavaPF's Avatar
    Join Date
    May 2008
    Location
    United Kingdom
    Posts
    3,336
    My Mood
    Mellow
    Thanks
    258
    Thanked 294 Times in 227 Posts
    Blog Entries
    4

    Default Re: Meaning of Java Packages

    Hello and welcome to the forums.

    A Java package is a mechanism for organizing Java classes into namespaces similar to the modules of Modula. Java packages can be stored in compressed files called JAR files, allowing classes to download faster as a group rather than one at a time. Programmers also typically use packages to organize classes belonging to the same category or providing similar functionality.
    Eclipse gives you the option to name the package whatever you like. When you create a package, your bin and src folders for that project will be in there. If you do not set a package, it defaults to the default package.
    Please use [highlight=Java] code [/highlight] tags when posting your code.
    Forum Tip: Add to peoples reputation by clicking the button on their useful posts.

Similar Threads

  1. Problem with Packages
    By pirezas in forum What's Wrong With My Code?
    Replies: 3
    Last Post: November 12th, 2010, 03:41 PM
  2. [SOLVED] Confuced when import packages...
    By Delmi in forum AWT / Java Swing
    Replies: 2
    Last Post: May 20th, 2010, 03:39 AM
  3. [SOLVED] placing packages of the same directory into an array
    By javanub:( in forum Java Theory & Questions
    Replies: 16
    Last Post: May 18th, 2010, 07:49 AM
  4. the meaning of 'instanceof'
    By Abednego Setyawan in forum Object Oriented Programming
    Replies: 1
    Last Post: March 12th, 2010, 01:45 AM
  5. importing packages..
    By chronoz13 in forum Java IDEs
    Replies: 4
    Last Post: November 23rd, 2009, 05:49 PM