OneCloud Interview Question

How to write a singleton pattern?