class _temp
{
public static void main(String args[])
{
_temp object = new _temp();
int x = 1;
System.out.println("x = " + object.x);
}
}
When I try to compile this code the following error is shown :
_temp.java:28: error: cannot find symbol
System.out.println("x = " + object.x);
^
symbol: variable x
location: variable object of type _temp
1 error
What am I doing wrong? Thank You.