Question: What is the code below equivalent to?

  1. `myClass.foreach(println ())`
  2. `myClass.foreach(print NIL)`
  3. `myClass.loop(println ())`
  4. `myClass.foreach(x => println(x))`

Answer: The correct answer of the above question is Option D:`myClass.foreach(x => println(x))`