when I am coding this at class level
int a; a=5;
it throws error : \"identifier expected\"
But when I declare it as a local variable li
Assigning a value to variable is called as expression. We could not write any expression in a class. We could do the same in method bodies. Basically we could right expressions when scope is defined and hence allowed in method.