您的位置:首页 > 职场人生

虽然是程序员,也要找点快乐啊---代码中的秘密,欢迎大家修改或者提出自己的想法

2013-03-11 13:34 639 查看
public class Myself {

 public static void main(String[] args){

  System.out.println("Whatever you speak ,you select it!");

  System.out.println(makeDecision(makeItByGod()));

  //my decision is this

  new Heart().hideMySecret(makeDecision(false));

 }

 public static String makeDecision(boolean isSpeakToHer){

  if(isSpeakToHer == true){

   return "Maybe we won't see or i don't know what will happen!";

  }else{

   return "Maybe it's my secret for ever!  ";

  }

   }

 

 public static  boolean makeItByGod(){ //help you to make a decision

  if(Math.random() > 0.5d){

   return true;

  }else

   return false;

 }

 

}

class Heart{

 private String mySecret;

 public void hideMySecret(String decision){

  mySecret = decision;

 }

}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  心情文章
相关文章推荐