48 keywords reserved word goto const and NULL false true cannot directly use character type Boolean floating-point shaping char 2 byte int range 2 11-position operation is operator conditional arithmetic escape character \b \ r Carriage return \ tab \ "\ ' character constant 16 encoding total 65,535 characters where qian256 and ASCII are the same ' \u0023 ' if a double is saved with a float without error, But high-precision rotary float requires wall brick bigdecimalstring class is a typical immutable class constant pool string s1= "ASD" string s2= "ASD" Syso (S1==S2) Truejava will determine that no string constant has only one Bitwise operations: | ~ ^ xor << >> >>> XOR returns ture when two operands are different, otherwise false--arithmetic 2--assignment operation--comparison operation--logical operation--type operation conitunue is the end of this cycle, Go directly to the next loop return this method exits Java common package lang util net IO text SQL AWT swinginstanceof cast Integer i=5;object o=true;if (o instanceof Boolean) {Boolean b= (Boolean) O; System.out.println (b);} Equal and = = Differentiate Singleton mode: private constructor and private attribute (judging whether it is empty and bad) and public getinstance () method class Single{private static single Single;privat E single () {}public static a getinstance () {if (single==null) {single=new single (); System.out.println ("I'm encapsulated in good");} return single;}} Final cannot be overridden for a private decorated parent class, in which case the subclass inherits the properties and methods of the parent class, and overrides or does not overload the abstract class that can be new but the abstract method of the abstract class must be overloaded with abstract class Car1{public int S;puBlic Car1 () {}public void setspeed (int s1) {this.s=s1;} public abstract Double Getradius ();p ublic double getss () {return Math.pi*2*getradius () *s;}}
Java Basic Grammar knowledge