SCJP

1. Int的范围 -214748364――2147483647 2. You can stop a thread indefinitely if you wish to 3. 定义native方法的方式 public native void me(); 4. 在静态类中不能引用非静态类变量 5. char=”/u00ee” (right) char=”/U00eee” (wrong) 6. If classA itself can’t be accessed by classB then no member within classA can be accessed by classB 7. If even a single method is abstract,the whole class must be declared abstract. 8. The protected member can be accessed only through inheritance. 9. Local variable only can be declared with final final变量作为field时,可以在当前行初始化,也可以在构造函数时初始化。 10. Static method can’t be overridden 11. 访问修饰符可以任意调换次序,,但返回类型必须紧贴名称 12. ++I 先++,再赋值,i++,是先赋值,再++ 13. HASHMAP 和HASHTABLE的区别:HASHTABLE是线程安全的 14. Main can be declared final 15. Continue must be in a loop 16. Int[][] a={{1,2},{3,4},} (right) 17. System.out.println(4+” ”+2); System.out.println(4+’ ’+2); a) Int i=10,j=3,k=7,p=30 p+=k-=j<<=i%=4;(注意运算从右向左) 18. I=10?equals10():notequals10() (wrong ,这个式子是有返回值的) 19. Byte b=-1; b=(byte)(b>>>4);System.out.println(b); (此时b仍为-1,因为移位时是32位的整数) a) Int a=28; int b=27 byte t=a-b; compile error int a=28; int b=27;byte t=0; t+=a-b; (right) 

接上文:

21An instance sl of a class S that extends a class B,where B declares the protected member and where sl is referring to one of the following:

1.its own copy of the proteched member inherited from B

2.a copy of the protected member owned by another instance S2 fo S (and therefore inherited from B)

3.a copy of the protected member owned by an instance of a subclass of S

22. null false true 不是保留字

23Float f1= 0.0f ;

       Float f2= -0.0f

       Double d1=0.0

       Double d2=-0.0

       Int i=0

       F1=f2=d1=d2=i

24.  char a=’/u 0061’ ;

        Char /u0061=’a’;

        Ch/u0061r /u0061=’/u 0061’

25.           methodA(){

  int I,j;

    if(true){i=1;}

    if(i==1){j=2;}

    System.out.println(i);  (right)

    System.out.println(j);  (wrong)

}

Reason :

If the java compiler can immediately determine the value of Boolean expression within an if() statement,it will not generate code to evaluate the expression at runtime,if the compiler can determine that the Boolean expression is always false,it will not generate code for the corresponding compound statement.

26.           constructor and abstract method can not be declared static final sychnorized native or strictfp

27.           final 变量必须赋值,否则编译无法通过

28.           int i=j; int j=1  (wrong)

int i=j; static int j=1; (right)   因为static初始化早

29.           int []a={1,2}

int []b=(int[])a.clone();   此时: a<>b

30.           stclass s=new stclass();

s=null;

s.amethod();  //valid only if the amethod() is static one

31.   String x=new String();

        String y=new String(“”);

Both x and y creat an empty string

32           min(-0.0,0.0)=-0.0

33           class A{}

class B extends A{}

class C extends A{}

A a=new A();

B b=new B();

C c=new C();

       Compiler      runtime

 a=b    right          right

 b=c;    wrong        wrong

 b=(b)c  wrong        wrong

b=(b)a;  right         may be wrong

 b=a;     wrong       wrong

 a=(a)b;   right        right

 

34. int x=6; double y=9.7;

       System.our.println((x<y)?9:8.6);   输出9.0

       System.our.println((6<9.7)?9:8.6);  输出9

35boolean b=new boolean(“true”);

       boolean b2=new boolean(“asdfad”);

   b=true b2false

36Synchnorized ―――

class methodinstance methoda part in method

37switchk k―――byte char int

38wait must be called inside sychronized code

39. class A{

       static{

       System.out.println(“sdfasd”);

}

}

此部分并不是实例化一次就执行一次,而是loadjvm时执行一次,即 java A时执行一次

40 int a=(octal)5;  octal不是合法字符
 

 

41It is valid to throw (and re-throw) an exception inside a catch(){} clasuse.

42. String Integer Double Date File override the equals() method.

43. The Class class has no constructors.

44. Unicode uses 16-bit to represent a char

       UTF uses as many as bits as are needed to represent a char

45. a instanceof b (right)

   A instanceof (b)  (wrong)

46.double d=-0.5;

       Math.ceil(d)=-0.0

       Math.floor(d)=-1.0

47. public transient static final int abc=800;   (right)

48. String.trim() 是去掉字符串两边的空格

49Long val=new Long(“ 11” );

       byte bb=val.byteValue();

50.        int[] a=new int[]{1,2,3}  (right)

51.        Java &不用于字符串之间的连接

52.        interface methods are public, so the method being implemented must be public

53.        null object instanceof a class always results in false

54.        why define a method native:

1.       to get to access hardware that java does not know about

2.       to write optimsed code for performance in a language such as C++

55.        int[] a=new int[5];

System.out.println(a[5]);  runtime error rather than compile error

56You can obtain a mutually exclusive lock on any object

57Interface 也是object的子类

58.熟练掌握collection map 部分,包括其中的方法

59An interface can not be instantiated

60. collection中方法有 isEmpty()  toArray()  iterator()


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
校园失物招领系统管理系统按照操作主体分为管理员和用户。管理员的功能包括字典管理、论坛管理、公告信息管理、失物招领管理、失物认领管理、寻物启示管理、寻物认领管理、用户管理、管理员管理。用户的功能等。该系统采用了Mysql数据库,Java语言,Spring Boot框架等技术进行编程实现。 校园失物招领系统管理系统可以提高校园失物招领系统信息管理问题的解决效率,优化校园失物招领系统信息处理流程,保证校园失物招领系统信息数据的安全,它是一个非常可靠,非常安全的应用程序。 ,管理员权限操作的功能包括管理公告,管理校园失物招领系统信息,包括失物招领管理,培训管理,寻物启事管理,薪资管理等,可以管理公告。 失物招领管理界面,管理员在失物招领管理界面中可以对界面中显示,可以对失物招领信息的失物招领状态进行查看,可以添加新的失物招领信息等。寻物启事管理界面,管理员在寻物启事管理界面中查看寻物启事种类信息,寻物启事描述信息,新增寻物启事信息等。公告管理界面,管理员在公告管理界面中新增公告,可以删除公告。公告类型管理界面,管理员在公告类型管理界面查看公告的工作状态,可以对公告的数据进行导出,可以添加新公告的信息,可以编辑公告信息,删除公告信息。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值