Try to avoid breaks, there's always an other way to write your loop so you don't need it which is much 'prettier' and easier to understand if someone else has to modify your code. In your example the while loop is unnecessary but to show you how it's possible:
while(x > 0) {
for(int i = 5; i > 0 && x!=0; i++) {
x = x-2;
}
}
If x equals 0, the for-loop will be left. Then your while condition will be verified: x is smaller then 0 (it's zero) so your while loop will stop executing too.