SCJP

xiaoxiao2021-03-06  108

1. INT range -214748364-2147483647 2. You can stop a thread indefinitely if you wish to 3. The way the Native method is defined public native void me (); 4. The non-static class variable 5 cannot be referenced in the static class. CHAR = "/ u00ee" (Right) char = "/ u00eee" (WRONG) 6. IF classa itself can't Be Accessed by classb the no member within classa can be beacssed 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. When the Local Variable Only Can Be Declared with final final variable, the current row can be initialized in the current row or initialized at the constructor. 10. Static Method CAN't Be Overridden 11. Accessing modifiers can be arbitrarily arbitrarily, but the return type must be close to the name 12. i first , then assign the value, i , is assigned first, then 13. The difference between HashMap and HashTable: hashtable is a thread security 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; (note the operation from right to left) 18. I = 10? Equals10 (): Notequals10 () (WRONG, this formula is returned) 19. BYTE B = -1; b = (B >>> 4); system.out.println (b); (at this time B is still -1, because the shift is 32-bit integers) a) INT A = 28; int b = 27 byte t = ab; compile error INT A = 28; int b = 27; byte t = 0; t = ab; (Right)

Conf course: 21. An 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 The Protected from B) 3.A Copy of The Protected Member Owned by An Instance of A Subclass of S22. NULL FALSE TRUE is not a reserved word 23. Float F1 = 0.0F

Float F2 =

-0.0f

Double D1 = 0.0 Double D2 = -0.0 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 variables must be assigned, otherwise unable to compile 28. int i = j; INT j = 1 (WRONG) INT i = j; static int j = 1; (Right) Because Static initializes early 29. int [] a = {1, 2} int [] b = (int []) A.clone (); Here: 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 = new b (); c = new c (); compiler runtime a = b Right Right 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.0.Println ((x

Boolean B2 = New Boolean ("ASDFAD");

Then b = true b2 = false

36. SYNCHNORIZED -----

Class method. Instance method. a part in method37. Switch (k) K ---- Byte Char Int

38. Wait Must Be Called Inside Sychronized Code

39. Class A {

STATIC {

System.out.println ("SDFASD");

}

}

This part is not instantified once, but executes once when LOAD is to JVM, that is, Java A is executed once.

40 INT A = (Octal) 5; Octal is not a legitimate character

41. It 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 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 () is a space 49 that removes both sides of the string. Long Val = new long ("

11 "

); Byte bb = val.bytevalue (); 50. int [] a = new int = {1, 2, 3} (Right) 51. Java & Not a String Between Connections 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 56. You can Obtain a Mutually Exclusive Lock On ANY Object 57. Interface is also subclass 58 of Object. Skilled in the Collection Map portion, including the method 59. An interface can not be instantiated 60. Collection Method is iSempty () toArray () iterator ()

转载请注明原文地址:https://www.9cbs.com/read-105096.html

New Post(0)