package com.hao.gitxuexi;
/*
* 单例模式的实现
* */
public class Hello {
public static void main(String[] args) {
int ints = sum(3);
System.out.println(ints);
}
public static int sum(int n){
int sum = n;
boolean b = (n > 0) && (sum += sum(--n)) > 0;
return sum;
}
}