April 2018
Intermediate to advanced
396 pages
11h 8m
English
Lazy initialization is particularly useful when initializing an object or variable that would take too long or might not even be needed. Some might say that we can simply use methods, and this is partly true. However, imagine a case where we might need to access a lazily initialized variable/object from multiple methods in different calls to our object. In this case, it is useful to store the result somewhere and just reuse it.
Read now
Unlock full access