Eirika Renais
2011-10-01 21:17:41 UTC
Here is an extremely simplified version of my problem.
public class asdf
{
public static void main(String[] args)
{
int a;
testing();
}
public static void testing()
{
a = 4;
System.out.println(a);
}
}
If I try to compile it, I get the following errors:
asdf.java:10: error: cannot find symbol
a = 4;
^
symbol: variable a
location: class asdf
asdf.java:11: error: cannot find symbol
System.out.println(a);
^
symbol: variable a
location: class asdf
2 errors
How should I go about fixing such a problem? (Btw, I've only been learning Java for ~1.5 months, go easy on me)