Define the variable i outside the scope of the method. Several ways to do this: define it as an instance variable, define it as static outside the method so it can be accessed by the static method....