when to use prevent the same instance of class to be generated twice how to use call a constructor in a method to build the class.