Novice programmers find Java hard because in order to write any working program, they need to know about classes, methods, and confusing keywords and syntax: static, void, etc.
J0 (pronounced “J-zero”) solves this problem by letting programmers write methods and statements outside any class. Yet J0 keeps all of the power of Java too: any legal Java program is a legal J0 program.
An example program (click on it to toggle between the J0 and Java versions):
{ println("Please enter your name:"); print("Name: "); String name = readLine(); println("Hello, " + name + "!"); }Notice that the programmer doesn't have to define classes or methods in order to get started. Some helpful static methods like println are also automatically imported. Now click on this text to see the equivalent Java code.
The J0 compiler is freely available for public download.
J0 was developed at Cornell University using the Polyglot extensible Java compiler framework. The major contributors are: