enum Speed{ STOP, SLOW, NORMAL, FAST}Speed s = Speed.SLOW;switch(s) { case SLOW: break; }参考文献: Java Quick Syntax Reference by Mikael Olsson
分类:
编程语言 时间:
2014-08-09 04:53:16
阅读次数:
295
重载 class MyRectangle{ int x, y; public MyRectangle() { x = 10; y = 20; } public MyRectangle(int a) { x = a; y = a; } public MyRectangle(int a, int b) ...
分类:
编程语言 时间:
2014-08-09 04:52:57
阅读次数:
208
通过关键字Final我们可以使变量成为常量。这意味着无法再给这个变量赋值,不然编译器就会报错。 class MyClass{ final double E = 2.72; // run-time constant 运行常量 final static double C = 3e8; // compil...
分类:
编程语言 时间:
2014-08-09 04:52:36
阅读次数:
280
class B {}class A {}--------------------------class C {}interface I {}-----------------------class D {}class E {}参考文献: Java Quick Syntax Reference by ...
分类:
编程语言 时间:
2014-08-09 04:52:17
阅读次数:
253
if (x 1) System.out.print(x + " > 1");else System.out.print(x + " == 1");Switchswitch (y){ case 0: System.out.print(y + " is 0"); break; case 1: Syste...
分类:
编程语言 时间:
2014-08-09 02:35:12
阅读次数:
192
所有non-trival编程语言都提供了基本表达式(expression)去表示最简单的表达式组合表达式的方法抽象表达式的方法,也就是为表达式引入一个名字去引用它substitional model 替代模型sumOfSquares(3,2+2)sumOfSquares(3,4)square(3)+...
分类:
其他好文 时间:
2014-08-09 02:33:10
阅读次数:
267
public class MyApp { public static void main(String[] args) { System.out.print("Hello World"); }}
分类:
编程语言 时间:
2014-08-09 02:32:17
阅读次数:
353
Babe(小猪宝贝)第68届奥斯卡金像奖最佳影片(提名)a pig become a shepherd pig, it it a breakthrough.震撼,源于对常规思维的突破,让不敢想象的事情变成事实;震撼,源于对目标的坚持,对不拘一格事务的尝试,因为霍吉特的坚持,创造了一个奇迹;震撼,源于...
分类:
其他好文 时间:
2014-08-09 02:29:56
阅读次数:
252
You're chatting with Danny.Danny - Thank you for contacting live chat. My name is Danny. How can I assist you today?luo - hello.i want cancel my SSLlu...
分类:
其他好文 时间:
2014-08-09 00:01:46
阅读次数:
333
1、在线安装Propedit打开Eclipse的在线安装界面,点击AddName: propeditLocation:http://propedit.sourceforge.jp/eclipse/updates/2、在线安装SubclipseName: subclipse 1.6.xLocation...
分类:
Web程序 时间:
2014-08-08 23:59:16
阅读次数:
716