Barclays Interview Question

different way of creating singleton class.