The program below builds several views over a mutable ArrayBuffer, then changes the original data and prints the resulting strings.
You need to determine the exact stdout output after running the program.
view, the moment toList is evaluated, and repeated reads from the mutable collection.Demo program.scalac Demo.scala
scala Demo
view again.3.3.121scalac and scala@main def runDemo(): Unit in file Demo.scalaClick a line and write what it prints. Explanation is optional.