public class Beer { public static void main(String[] args) { //Geometric progression for (int i = 100; i >= 0; i = i - 1) { //or --i System.out.println(i + " bottles of beer on the wall"); System.out.println(i + " bottles of beer"); System.out.println("If one of those bottles should happen to fall"); System.out.println(i - 1 + " bottles of beer on the wall."); System.out.println(); sleep(2000); //2 seconds } } //The following eight lines are needed to get the above sleep to work. private static void sleep(long milliseconds) { try { Thread.sleep(milliseconds); } catch (InterruptedException e) { System.err.println(e.getMessage()); } } }