adds commit to the President class.

This commit is contained in:
Ehsan 2019-11-29 03:03:25 +03:30
parent e30d11545f
commit 45fee1868e

View File

@ -2,6 +2,10 @@ package com.designpatterns.structural.proxy.president;
import com.designpatterns.creational.singleton.Singleton; import com.designpatterns.creational.singleton.Singleton;
/**
* This is a class which is gonna be proxied by PresidentSecretary.
* Whenever any citizen decides to contact the President, they have to talk to the Secretary.
*/
public class President { public class President {
private volatile static President instance = null; private volatile static President instance = null;