Search timeline

People

Follow
Click to Follow java
The official page of the #1 programming language and development platform.
Follow
Click to Follow bestjava_
nyan
My #Java single-threaded concurrency solution is currently able to switch between tasks around 75-80 million times per second - on my 6 year old laptop. I guess that's enough for a lot of use cases. I still need to tweak the design a bit + add features, so the number may change.
22
274
Show this thread
Came across an interesting #Java compiler riddle while exploring the Apache Flink code base; what happens when compiling this code?
// in package a
public class Outer {

  private static class Inner {

    @FunctionalInterface
    public interface Supplier {
      int getInt();
    }
  }

  public static void invoke(Inner.Supplier supplier) {}
}

// in package b
import a.Outer;

public class Reference {

  public static void main(String[] args) {
    Outer.invoke(() -> 42);
  }
}
7
70