Lazy initialization is –

31. Lazy initialization is -

  1. Creating variables using the lazy keyword
  2. Done only on immutable variables
  3. Calculated at its first access
  4. All of the above

Answer: D) All of the above

Explanation:

Lazy initialization variables are those variables that are calculated when the first time they are accessed. Scala mutable variables cannot be lazy.

Comments and Discussions!

Load comments ↻






Copyright © 2024 www.includehelp.com. All rights reserved.