see full description on below link
Very Helpful Blog on Local Variables.
Scope of Local variables is restricted within the block in which they are defined.
int a=10, b=15;
public static void main(String s)
static void add()
Local variables override the instance variables (member variables of class).
It looks like you're new here. If you want to get involved, click one of these buttons!