1

i just wanted to know if there is any difference between these two Supplier statements:

() -> this.enabled
this::enabled

Thanks in advance :).

benfah
  • 21
  • 4
  • The first is supplying the value of a field; the second is supplying the result of invoking a method. Did you mean to write `() -> this.enabled()` for the first, to make them do the same? – Andy Turner Sep 01 '18 at 20:46
  • No, I was just trying to understand the code of a project on github. Now I saw that the first was supplying a field and the second was supplying a method. Thanks :) – benfah Sep 01 '18 at 21:01

0 Answers0