DulcetAirman icon

getter as method reference

DulcetAirman | PRO | 11/11/18 04:41:23 PM UTC | 0 ⭐ | 826 👁️ | Never ⏰ | []
Java |

290 B

|

None

|

0 👍

/

0 👎

package ch.claude_martin;
 
import java.util.function.ToIntFunction;
 
public class Foo {
  private int getBla(Foo this) {
    return 42;
  }
 
  public static void main(String[] args) {
    ToIntFunction<Foo> ref = Foo::getBla;
    System.out.println(ref.applyAsInt(new Foo()));
  }
}

Comments