Question: Why does not this code snippet compile?

  1. Because name is a class parameter, not a property-it is unresolved `main()`.
  2. In order to create an instance of a class, you need the keyword `new`
  3. The reference to name needs to be scoped to the class, so it should be `this.name`
  4. Classes cannot be immutable. You need to change `var` to `val`

Answer: The correct answer of the above question is Option D:Classes cannot be immutable. You need to change `var` to `val`