Results 1 to 3 of 3
  1. #1
    Mattedatten is offline Member
    Join Date
    Aug 2009
    Location
    South Sweden
    Posts
    24
    Rep Power
    0

    Default What does package do?

    Hello all
    I googled a little but got no short good explanation, what is a package?
    I mean, here, in this tutorial (thanks to whoever that had this in signature) Free Java Video Tutorial Variables and Datatypes Part 2
    He says to import under package, but i do not use a template for writing new java-files, that means, I haven't ever used this "package"

    Can someone, in short termes explain what it is and if it's needed?

    Thanks! :)
    ///Mattedatten

    Edit: While I'm at it, without googling, what does the "private" "final" and so on stuff do? I mean, someone here in the forum wrote "final int", does that mean simply that that int is unchangeable?

  2. #2
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,315
    Blog Entries
    1
    Rep Power
    26

    Default

    Quote Originally Posted by Mattedatten View Post
    Hello all
    I googled a little but got no short good explanation, what is a package?
    I mean, here, in this tutorial (thanks to whoever that had this in signature) Free Java Video Tutorial Variables and Datatypes Part 2
    He says to import under package, but i do not use a template for writing new java-files, that means, I haven't ever used this "package"

    Can someone, in short termes explain what it is and if it's needed?
    Yes, it's needed. I don't think I could explain it all in short terms, especially since I don't know exactly what you don't understand about it, but here are decent tutorials you should look at and study:
    What Is a Package? (The Java™ Tutorials > Learning the Java Language > Object-Oriented Programming Concepts)
    Creating and Using Packages (The Java™ Tutorials > Learning the Java Language > Packages)


    Edit: While I'm at it, without googling, what does the "private" "final" and so on stuff do? I mean, someone here in the forum wrote "final int", does that mean simply that that int is unchangeable?
    It's much better that you first Google this first and then explain to us what you do or don't understand. I'm not sure that any of us can explain this better than the major tutorials (and I know that many don't have the time to either). Please have a look here for the main Sun tutorials:
    The Really Big Index

    Much luck!

  3. #3
    gcalvin is offline Senior Member
    Join Date
    Mar 2010
    Posts
    952
    Rep Power
    5

    Default

    Here's a page that might give you a better idea of what packages and access level modifiers (private, protected, public) are all about:

    Controlling Access to Members of a Class (The Java™ Tutorials > Learning the Java Language > Classes and Objects)

    -Gary-

Similar Threads

  1. Import your own package
    By Umi in forum New To Java
    Replies: 4
    Last Post: 02-15-2010, 10:05 AM
  2. Replies: 7
    Last Post: 11-09-2009, 08:51 AM
  3. jxl package
    By little_polarbear in forum New To Java
    Replies: 5
    Last Post: 05-05-2009, 03:19 PM
  4. Regarding package
    By makpandian in forum New To Java
    Replies: 2
    Last Post: 03-24-2009, 06:47 PM
  5. JXL Package
    By gaya3 in forum Java Servlet
    Replies: 1
    Last Post: 05-23-2008, 10:03 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •