package J20250721;

/**
 * @author WanJl
 * @version 1.0
 * @title AddableDemo
 * @description
 * @create 2025/7/21
 */
public class AddableDemo {
    public static void useAddable(Addable addable){
        int sum = addable.add(15, 6);
        System.out.println(sum);
    }

    public static void main(String[] args) {
        useAddable(new Addable() {
            @Override
            public int add(int a, int b) {
                return a+b;
            }
        });

        useAddable((a,b)->a+b);
    }
}
