Domanda di colloquio di Thoughtworks

How does API work, Code Singleton pattern and Synchronous block in JAVA