Hi,
<h5><code>
public class
test {
static int x;
static int y;
static final int z=0xaa;
int s=0;
public static void main(
String args[]){
System.out.println(x);
System.out.println(y);
System.out.println(z);
new test().hello();
//hello();
}
void hello(){
System.out.println(s);
}
}
</code></h5>
When i tried to run this program it is working good,but when i tried to run the program by uncommenting the line //hello() i'm getting the error
test.java:14: non-static method hello() cannot be referenced from a static context
hello();
^
1 error
Though i can roughly understand the error,I' couldn't able to compeltely understand the error context with JLS reference if available..