Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Use 'HelloWorld' as the name of the class and type in the sample program:

Here is the source code:

import static edu.rice.hj.Module1.async;
import static edu.rice.hj.Module1.finish;

public class HelloWorld {
    public static void main(final String[] args) {
        finish(() -> {
            async(() ->
System.out.println("Hello World - 1")
            );
            async(() ->
System.out.println("Hello World - 2")
            );
            async(() ->
System.out.println("Hello World - 3")
            );
        });
    }
}

Now we can run this program by right clicking on the HelloWorld item on the project explorer and clicking run.

...