Lambda表达式基础语法: (参数) ->{ 方法体 }
()里的参数呢
书写有错误,方法调用不需要等号,把等号去掉即可,如下:
animalShout(() -> System.out.println("lambda表达式输出:" + name + "喵喵"));