WD interview question

write singleton pattern in java