Java Basic Grammar knowledge

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.