- 博客(4)
- 收藏
- 关注
翻译 java解惑--final
class Jeopardy { public static final String PRICE = "$400"; } public class DoubleJeopardy extends Jeopardy { public static final String PRICE = "2 cents"; public static void main(String[] args) {
2015-05-12 22:30:03 298
转载 java解惑--跨包方法覆写
package hack; import click.CodeTalk; public class TypeIt { static class ClickIt extends CodeTalk { void printMessage() { //包访问权限 System.out.println("Hack"); } } public static void main(
2015-05-07 21:08:08 489
转载 java解惑--灰色的影子
public class ShadesOfGray { public static void main(String[] args) { System.out.println(X.Y.Z); } } class X { static class Y { static String Z = "Black"; } static C Y = new C(); } class C
2015-05-07 20:32:11 359
转载 java解惑--令人混淆的构造器案例
public class Confusing { private Confusing(Object o){ System.out.println("Object"); } private Confusing(Double[] dArray){ System.out.println("double array"); } pu
2015-05-05 20:42:32 409
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人