hi,
i've the following class and would like explaination of why the expression
x = 24 gives a compilation error. i assume its because its outside a method, but am looking for detailed explaination.
public class Example281 {
int x = 12;
x = 24;
public static void go( int x) {
System.out.println(x);
}
public static void main (
String[] args) {
Example281 ex281 = new Example281();
ex281.go(25);
System.out.println(ex281.x);
}
}