If a variable need not be shared across methods, make it local.

private int x;

int method() {

x = 0;    // if you forget to initialize, you're dead

...         // do some stuff

return x;

}

 

int method() {

int x = 0;

...         // do some stuff

return x;

}