Skip to content

Examples of code written in Javagony. The challenge is to use try-catch and recursion instead of "if", "for", etc.

License

Notifications You must be signed in to change notification settings

spenserblack/javagony-examples

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Javagony Examples

The basic idea of Javagony is that you can only use try {} catch {}. if, for, while, etc. are not allowed.

Intro

try {
  final int equal = 1 / (x - y);
  System.out.printf("%d != %d\n", x, y);
} catch (ArithmeticException e) {
  System.out.printf("%d == %d\n", x, y);
}

See more complex examples at javagony/.

About

Examples of code written in Javagony. The challenge is to use try-catch and recursion instead of "if", "for", etc.

Topics

Resources

License

Stars

Watchers

Forks

Languages