摘要:
没有枚举之前: 在没有枚举之前,我们想列举一些相关的常量,我们会采用如下的方式:interface ActionInterface { public static final int RIGHT = 0; public static final int LEFT = 1;}然后在某个类似于下面的方法中,使用这些常量:public void playWithInterface(int num) { switch (num) { case ActionInterface.RIGHT: System.out.println("RIGHT"); b... 阅读全文
posted @ 2013-03-27 15:35
丿黑色丶幽默丨灬
阅读(1705)
评论(0)
推荐(2)

浙公网安备 33010602011771号