fork download
  1.  
  2. class Ideone {
  3. public static void main (String[] args) throws java.lang.Exception {
  4. Runnable runnable = new Object() {
  5. Runnable target = () -> {
  6. System.out.println(this.target); // 'this.target' effectively references the lambda here.
  7. };
  8. }.target;
  9.  
  10. runnable.run();
  11. }
  12. }
Success #stdin #stdout 0.12s 4575232KB
stdin
Standard input is empty
stdout
Ideone$1$$Lambda$1/1078694789@682a0b20