这是我以前写的一小段代码,代表我对人生的理解,拿出来和大家分享一下.不要认为它只是一段普通的代码哦,细细的看,或许你会和我有相同的感受.
package nature; import nature.Nature import nature.Journey; import nature.Person; /** * 人的一生就是一次旅程。 * 你的本质和你的对自己的认知决定了你的这次旅程是否精彩。 * * @author 特务小强 * @date 2004-11-12 * @version 0.9.4 */ public class Life extends Journey{ public void Life(){ supper(); } public void Life(String startPlace,String endPlace,Srting toEndRoute){ supper(startPlace,endPlace,toEndRoute); } public boolean shallSuccess(Person person){ boolean hasSuccess = false; try{ boolean isKnowStartPlaceOfSelf = person.isKnowStartPlaceOfSelf(); boolean isKnowEndPlaceOfSelf = person.isKnowEndPlaceOfSelf(); boolean isKnowToEndRouteOfSelf = person.isKnowToEndRouteOfSelf(); if(isKnowStartPlaceOfSelf && isKnowEndPlaceOfSelf && isKnowToEndRouteOfSelf){ hasSuccess = true; } } catch(LifeException lifeexception){ hasSuccess = false; lifeexception.noHelp("No help!"); } return hasSuccess; } public static void main(String arg[]){ Nature nature = new Nature(); private String startPlace = nature.giveYouStartPlace(); private String endPlace = nature.giveYouEndPlace(); private Srting toEndRoute = nature.giveYouToEndRoute(); Life yourLife = new Life(startPlace,endPlace,toEndRoute); Person yourself = new Person(); if(yourLife.shallSuccess(yourself)){ System.out.println("Have success!"); } else{ System.out.println("Have not success!"); } } }
强!
欢迎光临 栖息谷-管理人的网上家园 (https://bbs.21manager.com.cn/) | Powered by Discuz! X3.2 |