import edu.rice.hj.api.HjRunnable; import static edu.rice.hj.Module1.initializeHabanero; import static edu.rice.hj.Module1.finalizeHabanero; import static edu.rice.hj.Module1.finish; import static edu.rice.hj.Module1.async; public class HelloWorldError { public static final String s = "HelloWorld"; public static void main(String[] args) { initializeHabanero(); finish(() -> { // HjRunnable is a functional interface. // It has one unimplemented method: void run() // The statement below is using lambda expressions to create an instance of HjRunnable // Note we are avoiding the verbose syntax to create anonymous inner classes with lambdas. final HjRunnable aRunnable = () -> { System.out.println("First: " + s); }; // We pass async an instance of HjRunnable to run asynchronously async(aRunnable); // Instead we can also directly inline the lambda expression into the async call. async(() -> { // TODO: Fix the error by changing 'ss' to 's' to gt rid of the compiler error System.out.println("Second: " + ss); }); }); finalizeHabanero(); } }