File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Beginning Java and the fly likes Cannot find symbol Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Cannot find symbol" Watch "Cannot find symbol" New topic

Cannot find symbol

Juhan Voolaid
Ranch Hand

Joined: Nov 18, 2003
Posts: 179

This is so basic problem, but I just can't solve it.

I have too classes:
1. main-class -
2. the other -

Here are the source:


And the error I got after I compile my program with a line: javac
I get:

Campbell Ritchie

Joined: Oct 13, 2005
Posts: 45335
You don't need a declaration for int p, and the line with = separately.
You can write int p = tree.getPrice();
I actually tried condensing your code, so your method comes out as:
and it compiles and runs nicely.


I have also reverted to your original code, and it compiles without any reported errors.
[ October 16, 2005: Message edited by: Campbell Ritchie ]
Juhan Voolaid
Ranch Hand

Joined: Nov 18, 2003
Posts: 179
Ahh ... big thanx. I thought I was going crazy.
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
subject: Cannot find symbol
It's not a secret anymore!