Results 1 to 2 of 2
  1. #1
    Join Date
    Jan 2003

    Unanswered: packages in java..hellpp..URGENT!

    Hi all

    I have a doubt..
    I have 2 packages A and B and they contain files named and respectively
    Now in i want to include the file from package B which is
    Can anyone tell me how to do it..if i try to just include by importing B it tries looking for package B within A and gives me an error..
    Please tell me how I can do this task...need it source code..examples wud be gr88!

    thnx in advance

    You try and try again..but then give up, there's no sense in being a complete fool about it!!!

  2. #2
    Join Date
    Mar 2003
    package A;
    import B.*;

    package B;

    Both packages should reachable via the classpath, whether they are folders (\A\a.class and \B\b.class) or a JAR/ZIP.

    I do however not recommend having classes wihtout capital starting letter...


Posting Permissions

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