Results 1 to 5 of 5

Thread: import package

  1. #1
    gulhk is offline Member
    Join Date
    Dec 2012
    Posts
    3
    Rep Power
    0

    Default import package

    Hello all

    I am a student and I am new to Java. I have created a simple Java program. We have been given a package to import into the program we have developed. The classes of the package are stored in a folder called "pack" which is placed inside project folder called "tictactoe". The example program we were given imports the package as follows and it works fine.

    import pack.*;

    Is it that simple or do I need to do more.

    It gives me the error "The import pack cannot be resolved"

    Thanks

  2. #2
    DarrylBurke's Avatar
    DarrylBurke is offline Member
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,189
    Rep Power
    19

    Default Re: import package

    Cross posted
    import package

    db
    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

  3. #3
    gulhk is offline Member
    Join Date
    Dec 2012
    Posts
    3
    Rep Power
    0

    Default Re: import package

    Yes but are these not two different websites?

  4. #4
    doWhile is offline Moderator
    Join Date
    Jul 2010
    Location
    California
    Posts
    1,642
    Rep Power
    6

    Default Re: import package

    Quote Originally Posted by gulhk View Post
    Yes but are these not two different websites?
    Suggested reading: The problems with cross-posting

  5. #5
    gulhk is offline Member
    Join Date
    Dec 2012
    Posts
    3
    Rep Power
    0

Similar Threads

  1. Import and package
    By Pojahn_M in forum New To Java
    Replies: 32
    Last Post: 08-10-2011, 09:14 PM
  2. Import your own package
    By Umi in forum New To Java
    Replies: 4
    Last Post: 02-15-2010, 09:05 AM
  3. How to import a Java package?
    By tyang in forum New To Java
    Replies: 4
    Last Post: 02-06-2010, 09:14 PM
  4. How to import a package before it is compiled
    By gradStudent in forum Advanced Java
    Replies: 1
    Last Post: 08-11-2009, 12:17 AM
  5. How to import a package in Eclipse?
    By naipulb in forum New To Java
    Replies: 2
    Last Post: 06-09-2008, 11:04 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
  •