File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Beginning Java and the fly likes Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark ""Can Watch ""Can New topic
Author

"Can't Find Symbol" error in Java

Ben Stevenson
Greenhorn

Joined: Jun 04, 2013
Posts: 2
Hi all. Still trying to figure this whole java thing out. I'm VERY new at this and it's pretty confusing to me. I keep getting the "cannot find symbol" error in the following code:

[Added code tags - see UseCodeTags for details]

My errors are:

Module5.java:12: error: cannot find symbol
SuperArray myNumbers = new SuperArray( unSortedNumbers );
^
symbol: class SuperArray
location: class Module5
Module5.java:12: error: cannot find symbol
SuperArray myNumbers = new SuperArray( unSortedNumbers );
^
symbol: class SuperArray
location: class Module5
2 errors


I've tried looking up how to fix this, read books and articles and still can't figure out what "symbol" the program is looking for me to put there.
THANK YOU for your help!!


Just tell me where that damn lemon came from and I'll go away
Archana Nanjundarao
Greenhorn

Joined: Sep 26, 2007
Posts: 12
Hi Ben,

Have you declared SuperArray class? Without class declaration you can't use it and I think thats the reason you are getting the error.

Thanks.


Thanks,
Archana Rao
Matthew Brown
Bartender

Joined: Apr 06, 2010
Posts: 4490
    
    8

Archana's right. The compiler doesn't know what SuperArray is. That error always means that you're using something - e.g. a class name or variable name - that the compiler doesn't know about for some reason.

By the way, I've added code tags and reformatted your code to make it much easier to read. See the page UseCodeTags for instructions on how to do that yourself.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: "Can't Find Symbol" error in Java