SCJP Examination Certification Review Notes Series

zhaozj2021-02-12  139

SCJP Examination Certification Review Notes Series

The Boolean type in Java cannot be converted to the int type. Don't think true is 1, false is 0 local variables Be sure to initialize the Class in the Class. If you contain an abstract method, you must declare an abstract class, if there is no abstract method It can be declared as an abstract class, and the methods in the interface cannot be implemented in the interface. Length is a variable of an array rather than a method. Usually we calculate the case () method Boolean [] xx = new boolean [12] and boolean [] yy = new boolean [12] is: the former Object Array and initialized to null is the basic data type array is initialized to falseJava.util's class Vector and HashTable is the thread secure compiler to provide you with the default constructor's access control of the default constructor is with him. The access control is consistent 0.0 == - 0.0 is the local variable that returns TRUE cannot be declared as staticclass base {INT i = 99; public void amethod () {system.out.println ("Base.Amethod ()" } Base () {AMETHOD ();}} public class derived extends base {int i = -1; public static void main (string argv []) {base b = new derived (); system.out.println Bi); B.Amethod ();} public void amethod () {system.out.println ("derived.amethod ()");}} The above program output is derived.amethod () 99 derived.amethod (), When Base B = New Derived () is executed, first performs the base constructor, but since B's actual type is DeriveD, B's AMETHOD is called in the constructor. The variable is related to the type of declared, the output 9, method (excluding static method) is the output derived.amethod () remember the subscript of the array with the actual type, starting the StringBuffer SB = New StringBuffer ("ha"); system. Out.println (SB 1); this is not compiled by compilation, because does not use between StringBuffer and INT, only the comparison of different packaging classes between String and raw data types can return FALSE such as New Integer (4) .Equals (new long (4)); if it is the same type, Equals compare is their value that is the program containing Assert If it is executed, it will be ignored.

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

New Post(0)