loading …

Java Code for Christmas

十二月 24th, 2009 YuHP 5 Comments/216 hits

      刚刚和恺哥在Q上聊了一下关于Lonely Christmas的事,突然发现对于一个工科男生来说,使用程序代码来描述这个该死的鬼佬节日完全是可行的,于是乎就顺手敲出一段Java Code:

package edu.scut.emos.joke;

import java.util.Vector;
import edu.scut.emos.joke.human.Boy;
import edu.scut.emos.joke.human.Girl;


public class Christmas {
    public static void main(String[] args) {
        Boy me = new Boy("Haipeng");
        try {
            Vector<Girl> girls = me.findSomeGirls(); // Find the available girls
            Girl girl = girls.firstElement(); // Find the girl with highest priority
            me.niceChristmas(girl);
        } catch (NullPointerException e) { // It means the boy can not find a girl
            me.lonelyChristmas();
        } finally {
            me.christmasOver();
        }
    }
}

 

通常来讲,该程序的运行结果会是:

Lonely Christmas!! T_T
Christmas Over!! =_=

 

大家一起来YY~~哇咔咔~~

  1. avator
    ...
    2009-12-24 at 16:14 | #1
    fuc
  2. 2009-12-24 at 16:36 | #2
    哈哈,Java男的圣诞恶搞
  3. avator
    link
    2009-12-25 at 13:40 | #3
    Nice!
  4. 2009-12-31 at 15:01 | #4
    Happy New Year哇小HP~~~~哈哈
  5. avator
    HP
    2009-12-31 at 20:11 | #5
    @迷迭香
    哈哈~新年快乐哇~