singleton pattern in java with exle code design pattern and implementation of singleton design