What are good sample programs for learning to use a debugger?
A few Java specific examples come to mind:


Using % with a negative number - I recently came across this and had to remember how Java treats modulus v. remainder (cf. this thread)
Listing switch statements without the proper break; at the end of each case - maybe something that can be seen right away, but stepping through each line would be good to visualize this process
Integer division is also a classic - using the conventional Celcius-to-Fahrenheit (or vice versa) conversion program with the formula broken down over several lines would force them to see line by line what is happening when you evaluate 9/5 or 5/9
Operations with increment/decrement operators in prefix and/or postfix position throughout a program - I like this one a lot because of how variables may change without that change always being seen


I'll edit and add ideas as more occur to me.