ways of defining loop in java code example Example: java loop for (int i = 0; i < 10; i++) { System.out.println(i); }