Method reference to a static method

We can group each Melon from the aforementioned list that's 100 g via the static method called growing100g():

  • No method reference:
melons.forEach(m -> Melon.growing100g(m));
  • Method reference:
melons.forEach(Melon::growing100g);
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.137.41.205