/**
* 生活与成功<br/>
* 2012-03-27
*/
public class Life {
/**
* 结果
*/
static
boolean _result;
/**
* 次数
*/
static
long _time;
static
{
//
出生时
_result =
false;
_time =
0;
}
/**
* 成功接口
*
*
@param _try
*
尝试
*
@param _thinking
*
思考
*
@return
*/
public
static boolean success(boolean _try, boolean _thinking) {
while
(_try && _thinking) {
_result =
true;// 促使成功
int
support = 1000000000;// 得到支持
if
(_time > System.currentTimeMillis() / support) {
//
当尝试次数大于所需次数,成功诞生!
break;
}
_time++;//
一次艰辛的努力!
System.out.println(_time);//
当前努力次数
}
return _result;
}
/**
* 出生后
*
*
@param God
*
传说中的造物主
*/
public
static void main(String[] God) {
//
生活的成功在于尝试和思考
boolean
life = success(true, true);
if
(life) {
//
成功了,愉悦!
System.out.println("Happy!");
}
else {
//
失败了,达观!
System.out.println("Optimistic!");
}
System.out.println("不确定因素【时间:"+System.currentTimeMillis()+",获得的支持:1000000000?】");
}
}
|
只有程序员才能看得懂的生活哲理
最新推荐文章于 2025-08-16 21:08:39 发布