Modify the StockAverage2 program in Figure 12.13 by inserting into the streams method-call chain a .peek method

Question:

  1. Modify the StockAverage2 program in Figure 12.13 by inserting into the stream’s method-call chain a .peek method call that prints the previously entered values. Use a lambda expression for peek’s argument.

  2. Figure 12.13

/***** StockAverage2.java *Dean & Dean * * This program stores user-entered stock values in an ArrayList. *

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Question Posted: