Java is pass-by-value. That means changing the values of parameters in a method will not be reflected back to the caller. While technically legal, the IDE is assuming you really are trying to use different variable names which you have not declared. You don't need to pass anything: