Compiler can't resolve symbol
Hi,
I am working on a exercise from the book Thinking in Java ,and the jdk1.3 compiler can't resolve the varialbe symbols.
I hope this is a simple problem.
Here is the code.
class DataOnly {
public static void main(String[] args) {
DataOnly d = new DataOnly();
int i;
float f;
boolean b;
d.i = 47;
d.f = 1.1f; // the compiler can't resolve any of the symbols i,f,b
d.b = false;
}
}
Here is what the compiler is saying.
DataOnly.java:8: cannot resolve symbol
symbol : variable i
location: class DataOnly
d.i = 47;
^
DataOnly.java:9: cannot resolve symbol
symbol : variable f
location: class DataOnly
d.f = 1.1f;
^
DataOnly.java:10: cannot resolve symbol
symbol : variable b
location: class DataOnly
d.b = false;
^
3 errors
If anyone knows what my problem is please let me know.
Thx

