Lambdas


Lambdas

Lambda Syntax

PriceChanger.java
PriceChangerLambdas.java

LambdaEx.java

read chapter 17

IntStream


Classwork


Create an interface Operation, which requires a method op that takes two ints and returns an int.

In a main, using lambda expressions, create an array of Operations and put in it addition, subtraction, multiplication, division, modulus, and average;

Generate two random integers and then loop through the array, showing the results of the operation on these numbers.