I am asking this , because final & non-final have same scope , so why VARIABLE are added as final variable in java .. & what is the affect of adding some variable as final , when it is only accessed under some scope .
public void game()
{
final String str = "a" ;
//String str ="a" ;
class hollow
{
public void game ()
{
System.out.println(str);
}
}
}