March 2017
Beginner to intermediate
114 pages
2h 16m
English
package jdk8.byte_code;
public interface Server {
Boolean isRunning();
public class HttpServer implements Server {
@Override
public Boolean isRunning() {
return false;
}
}
}
package jdk8.byte_code;
import static jdk8.byte_code.Server.*;
import static jdk8.byte_code.WaitFor.waitFor;
public class Example2 {
// anonymous class (closure)
void example() throws InterruptedException {
Server server = new HttpServer();
waitFor(new Condition() {
@Override
public Boolean isSatisfied() {
return !server.isRunning();
}
});
}
}
Classfile Example2.class Last modified 08-May-2014; size 775 bytes MD5 checksum 2becf3c32e2b08abc50465aca7398c4b Compiled from "Example2.java" public class jdk8.byte_code.Example2 SourceFile: "Example2.java" InnerClasses: #4; ...Read now
Unlock full access