NSEIT interview question

How can you let this Singleton class getInstance() method be called from multiple threads?

Interview Answer

Anonymous

Aug 23, 2022

By marking the method with synchronized keyword.