- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
public static SomeHandler getInstance(int... initValue){
           if (initValue == null || initValue.length == 0) {
               initValue = new int[1];
               initValue[0] = 1;
           }
           if (initValue != null && initValue.length != 1) {
               throw new IllegalArgumentException("You should pass exactly one value");
           }
           if (instance == null){
               instance = new SomeHandler();
           }
           return instance;
}
 Follow us!
 Follow us!