This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
The first time through your for loop, the value of i is 0. Within that first loop, you start a new loop that says while i % 10 == 0, print the value of i. Since 0 % 10 == 0, your while loop begins, prints i, then evaluates the condition again (i % 10 == 0). Since i is still 0, and 0 % 10 is still equal to 0, the while loop runs again, ad infinitum.