package com.codinghabit.java8.book.ch3;

import com.codinghabit.java8.Apple;

import java.util.function.Supplier;

/**
 * Created by msavoury on 8/17/15.
 */
public class MethodReferences {

    public static void main(String [] args) {
        //First example we'll use a lambda as an argument,
        //we've seen this before
        takeReference(() -> new Apple(1, "test", "test"));

        //Now for the method reference:
        takeReference(Apple::makeApple);
    }

    public static void takeReference(Supplier<Apple> supplier) {
        Apple a = supplier.get();
        System.out.println(a);
    }
}

@@ -119,39 +119,62 @@
 %0A * 
-Created by msavoury on 8/17/15.
+This file showcases some usages of method references. 
 %0A */

Update MethodReferences.java