-
小亿 管理员
发表于2018-5-9 14:49
9个回答
public class MothersDayFromCodeMonkeyView
{
public MothersDayFromCodeMonkeyView()
{
int age=0; //猿猿刚出生的时候
saying="crying"; //除了哭啼,还不知道如何去表达
while(true)
{
try
{
Thread.sleep(365*24*60*60*1000L);
}
catch (InterruptedException e)
{
break; //猿猿明白这意味着什么
}
age++; //岁月如梭
switch(age)
{
case 3:
saying = "妈妈,我爱您";
break;
case 10:
saying = "妈,听您的";
break;
case 16:
saying = "我妈真的很烦";
break;
case 18:
saying = "想要离开这个家";
break;
case 25:
saying = "妈,您当时是对的";
break;
case 30:
saying = "我想要去我妈家";
break;
case 50:
saying = "我不想要失去我妈";
break;
case unknownAge:
saying = "只要我妈还能在这,我愿意为了我妈放弃一切";
break;
default:
saying = youDefineIt();
break;
}
}
new Thread(){public void run()
{
while(isPeopleStillLive())
{
saying = "每个人都只有一个妈妈,要好好的孝敬我们的妈妈!";
}
} }.start();
}
public boolean isPeopleStillLive()
{
return true || false; //猿猿很明白,人类最清楚
}
public String youDefineIt()
{
//猿猿自己说......
StringBuffer result = new StringBuffer();
result.append("......");
result.append("......");
result.append("......");
result.append("......");
return result.toString();
}
private static final int unknownAge = 70; //业界把这个常量设成了70,猿猿希望是100
private String saying ="";
public static void main(String[] args)
{
new MothersDayFromCodeMonkeyView();
}
}
初学代码,这是我对母亲的表达~