public class DoWhileExample { public DoWhileExample() { int maxValue = 10; int x = 5; do { System.out.println("X: " + x + ", Value: " + (int)(1 + Math.random() * maxValue)); } while (x-- > 1); } public static void main(String[] args) { new DoWhileExample(); } }