Different variable in a different scope referring to the same thing. Normally I'd agree with giving it a different name, but both scanner variables refer to the same object in memory, so it doesn't actually matter that they are different variables in the code as shown.