
class ExampleProfile {
	private static void hello(String name) {
		System.out.print("Hello "+name);
	}
	public static void exclaim() {
		System.out.println("!");
	}
	public static void die() throws Exception {
		throw new Exception("This is a test");
	}
	public static void main(String[] args) {
		hello("world");
		exclaim();
		try {die();}
		catch(Exception e) {}
	}
}

@@ -37,223 +37,900 @@
 tic 
-void hello(String name) %7B%0A%09%09System.out.print(%22Hello %22+name);%0A%09%7D%0A%09public static void exclaim() %7B%0A%09%09System.out.println(%22!%22
+final int BOARD_SIZE = 8;%0A%0A%09private static void validate(int%5B%5D queens) throws BailOut %7B%0A%09%09int left, right, col;%0A%09%09left = right = col = queens%5Bqueens.length-1%5D;%0A%09    for(int n = queens.length-2; n%3E=0; n--) %7B%0A%09%09%09int r = queens%5Bn%5D;%0A%09        left--;%0A%09%09%09right++;%0A%09        if(r == left %7C%7C r == col %7C%7C r == right) %7B%0A%09            throw new BailOut(
 );%0A
+%09%09
 %09%7D%0A%09
-public static void die() throws Exception %7B%0A%09%09throw new Exception(%22This is a test%22
+%09%7D%0A%09%7D%0A%0A%09private static int%5B%5D add_queen(int%5B%5D queens) throws BailOut %7B%0A%09%09try %7BThread.sleep(10);%7D%0A%09%09catch(Exception e) %7B%7D%0A%0A%09%09for(int i=0; i%3CBOARD_SIZE; i++) %7B%0A%09%09%09int%5B%5D test_queens = new int%5Bqueens.length + 1%5D;%0A%09%09%09for(int n=0; n%3Cqueens.length; n++) %7B%0A%09%09%09%09test_queens%5Bn%5D = queens%5Bn%5D;%0A%09%09%09%7D%0A%09%09%09test_queens%5Bqueens.length%5D = i;%0A%0A%09%09%09try %7B%0A%09%09%09%09validate(test_queens);%0A%09%09%09%09if(test_queens.length == BOARD_SIZE) %7B%0A%09%09%09%09%09return test_queens;%0A%09%09%09%09%7D%0A%09%09%09%09else %7B%0A%09%09%09%09%09return add_queen(test_queens);%0A%09%09%09%09%7D%0A%09%09%09%7D%0A%09%09%09catch(BailOut e) %7B%7D%0A%09%09%7D%0A%09%09throw new BailOut(
 );%0A%09%7D%0A
+%0A
 %09pub
@@ -973,74 +973,383 @@
 %7B%0A%09%09
-hello(%22world%22);%0A%09%09exclaim();%0A%09%09try %7Bdie();%7D%0A%09%09catch(Exception e) %7B
+int%5B%5D queens = new int%5B0%5D;%0A%09%09try %7B%0A%09%09%09queens = add_queen(queens);%0A%09%09%09for(int n=0; n%3Cqueens.length; n++) %7B%0A%09%09%09%09System.out.print(queens%5Bn%5D);%0A%09%09%09%7D%0A%09%09%09System.out.println(%22%22);%0A%09%09%7D%0A%09%09catch(BailOut e) %7B%0A%09%09%09System.out.println(%22Top-level bail%22);%0A%09%09%7D%0A//%09%09for(int n=0; n%3CBOARD_SIZE; n++) %7B%0A//%09%09%09int q = queens%5Bn%5D;%0A//%09%09%09System.out.println(%22. %22*q + %22Q %22 + %22. %22*(BOARD_SIZE - q - 1));%0A//%09%09
 %7D%0A%09%7D

update java profile example to use queens