How to wait for a Class to initialize?

Posted by Andre Scott | Updated on

Want to wait for a Class to initialize? You can refactor your Calendar class to expose a Future that completes the when the Calendar is ready to use:

Then you can await the Future, e.g.:


If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.

Related Questions & Answers