I guess then it's part of learning? These aren't in the book so I'm excited to have made them. With reference of course.
Code:
BeerBottles.java
public class BeerBottles {
void printBottles() {
for (int i = 99; i >= 1;)
System.out.println(i + " bottles of beer on the wall. " + i + " bottles of beer. Take one down pass it around, " + (--i) + " bottles of beer on the wall.");
}
public static void main(String[] args) {
BeerBottles a = new BeerBottles();
a.printBottles();
System.out.println("Who drank all the beer?");
}
}
Bookmarks