Results 1 to 4 of 4
  1. #1
    webbby is offline Member
    Join Date
    Apr 2011
    Posts
    1
    Rep Power
    0

    Default Cannot find Symbol

    i have two classes say A and B

    i am using A in Class B

    Both are simply stored in d drive(not in any package)

    but when i instantiate A's Object in B,and then compile it.It says Cannot find Symbol:class A


    Why am i getting this error??

  2. #2
    sunde887's Avatar
    sunde887 is offline Moderator
    Join Date
    Jan 2011
    Location
    Richmond, Virginia
    Posts
    3,069
    Blog Entries
    3
    Rep Power
    11

    Default

    Are they in the same package? If they are you should be able to have this work. If they are not in the same package you need to package a and import it in b. Try putting both classes in a folder and see if anything changes.

  3. #3
    ra4king's Avatar
    ra4king is offline Senior Member
    Join Date
    Apr 2011
    Location
    Atlanta, Georgia, US
    Posts
    396
    Rep Power
    6

    Default

    @sunde887
    He has already stated they are not in any packages and are in the same folder.

    @OP
    Could you give us code and exactly how you compile the classes?

  4. #4
    ra4king's Avatar
    ra4king is offline Senior Member
    Join Date
    Apr 2011
    Location
    Atlanta, Georgia, US
    Posts
    396
    Rep Power
    6

Similar Threads

  1. Cannot find symbol
    By shane5317 in forum AWT / Swing
    Replies: 3
    Last Post: 03-02-2011, 12:36 PM
  2. Cannot find symbol
    By TripleZigZag in forum New To Java
    Replies: 4
    Last Post: 02-02-2011, 03:36 AM
  3. cannot find symbol
    By GabWit in forum New To Java
    Replies: 3
    Last Post: 01-25-2009, 01:13 AM
  4. Replies: 9
    Last Post: 10-18-2008, 08:26 PM
  5. Replies: 3
    Last Post: 05-01-2008, 08:30 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
  •