SCJP
asran
这个作者很懒,什么都没留下…
展开
-
default constructor and no-parameter constructor
http://topic.csdn.net/t/20020203/10/516235.html125. Which two statements are true regarding the creation of a default constructor? (Choose Two) A. The default转载 2007-04-01 21:40:00 · 1296 阅读 · 0 评论 -
SCJP2007-06-10
1. Cant override static method to non-static method.原创 2007-06-10 19:20:00 · 644 阅读 · 0 评论 -
hashcode
Java 理论与实践: 哈希 有效和正确定义hashCode()和equals()原创 2007-04-17 22:22:00 · 769 阅读 · 2 评论 -
Can we put a continue in a switch-case statement?
// Guess the print out, then run it.// A good IQ testpublic class A { public static void main(String args[]) { int x = 0; while (x System.out.print(" " + x);原创 2007-04-04 13:19:00 · 640 阅读 · 0 评论 -
static inner class
Consider the following Java code fragment: public class A{ int y; public static class B { int x; void f () {} }}This fragment defines the class A which contains an static inner class原创 2007-04-03 13:09:00 · 728 阅读 · 0 评论 -
SCJP基本概念
chapter 1 声明和访问控制target 1 数组1.我们不能改变一个数组的大小,可以通过new一个新的数组,然后把值赋过去来得一个内容和原来一样而大小不一样的数组。2.当数组越界时,可以编译,但在运行时会报ArrayIndexOutOfBoundsException的异常。3.length是数组的一个属性,而不是方法。4.数组初始化的方法: int[] i = {原创 2007-04-02 12:42:00 · 659 阅读 · 0 评论 -
empty string and null
Which correctly create an array of five empty Strings? A. String a[]=new String[5]; for (int i=0;i B.String a[]={"","","","",""}; C.转载 2007-04-01 20:57:00 · 690 阅读 · 0 评论 -
关于匿名内部类
12. Which statement is true? A. An anonymous inner class may be declared as final B. An anonymous inner class can be declared as private转载 2007-04-01 21:46:00 · 772 阅读 · 0 评论 -
关于Runable接口和Thread的构造器
//在注释的地方选择合适的选项填入,以保证程序可以从1记数到100 class Counter { public int startHere=1; public int endHere=100; public static void main(String[] ar转载 2007-04-01 21:03:00 · 1920 阅读 · 0 评论 -
关于如何访问interface中定义的变量
http://topic.csdn.net/t/20011024/13/337598.htmlinterface Foo{ int k=0; } public static void main(String args[]){ int i; Test test原创 2007-04-01 20:51:00 · 6086 阅读 · 0 评论 -
是否在任何方法中都能使用super和this?
http://topic.csdn.net/t/20021031/11/1136699.html原题如下: Which of the following statements are true? 1) Constructors are not inherited 2) Constructors can b转载 2007-04-01 20:43:00 · 1515 阅读 · 0 评论 -
Can you explain the result of the following example? Oh, my!
class Base { public boolean foo(Base b) { return true; } } class Sub extends Base { public boolean foo(Sub s) { return false; } } public class Test { public static void main(St原创 2007-04-05 16:30:00 · 660 阅读 · 0 评论 -
Integer, Long, Double expressions
Integer i = new Integer(42); Long l = new Long(42); Double d = new Double(42.0); System.out.println(i == 42); System.out.println(i.equals(42)); System.out.pr原创 2007-04-01 22:01:00 · 973 阅读 · 0 评论 -
SCJP 2007-06-14
1. There are only abstract or final is permitted in local inner class.2. An Anonymous inner class means that creating an object of an anonymous class thats inherited from ClassName.原创 2007-06-15 00:05:00 · 556 阅读 · 0 评论