/** * 99 Bottles in Java - Exception Oriented Programming :-) * This program abuses concept of exceptions. * notice: it does not use any loops (for, while) or if statements * * use java 1.4 or newer * @author Jarek Ratajski */ public class EOP99Bottles { /** * this main method is very simple - * only throws exception and prints stack trace * would You suspect it is 99 bottles program ? :-) */ public static void main(String[] args) { try { throw new BottleException(1, null); } catch (Exception e) { e.printStackTrace(); } } private static class BottleException extends Exception { private final int cnt; /