关闭

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 ...
阅读(441) 评论(0)

SCJP基本概念

chapter 1 声明和访问控制target 1 数组1.我们不能改变一个数组的大小,可以通过new一个新的数组,然后把值赋过去来得一个内容和原来一样而大小不一样的数组。2.当数组越界时,可以编译,但在运行时会报ArrayIndexOutOfBoundsException的异常。3.length是数组的一个属性,而不是方法。4.数组初始化的方法:  int[] i = {...
阅读(405) 评论(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...
阅读(418) 评论(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   ...
阅读(399) 评论(0)

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   ...
阅读(866) 评论(0)

关于Runable接口和Thread的构造器

//在注释的地方选择合适的选项填入,以保证程序可以从1记数到100         class   Counter     {         public   int   startHere=1;         public   int   endHere=100;         public   static   void   main(String[]   ar...
阅读(1354) 评论(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.  ...
阅读(452) 评论(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   ...
阅读(4135) 评论(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...
阅读(471) 评论(0)
29条 共2页首页 上一页 1 2
    个人资料
    • 访问:32132次
    • 积分:560
    • 等级:
    • 排名:千里之外
    • 原创:23篇
    • 转载:6篇
    • 译文:0篇
    • 评论:5条
    文章分类
    最新评论