002-java Language Basics

Source: Internet
Author: User
Tags bitwise operators

I. Loading and unloading of safety

Uninstall: Control Panel

Install: Download the corresponding version

Note 1, installation path → try not to have spaces and Chinese characters

Note 2, after installation, the JRE can not be installed, the JDK contains

Second, environment variables

Environment variables: Understanding, some shortcut paths. Find apps and commands quickly and easily.

System Properties → environment variables

Added: Java_home:java Installation path

path→ Increase%java_home%/bin

Classpath Not Configured after jdk1.6

Third, the Java Foundation

Javac A.java: Compile build. class file

Java a: Executing A. class file

Note://single line

/**/Multiple lines

/***/Description Document

Identifier "class name, variable name, constant name, method name, etc."

Start with: Letters, underscores, dollar breaks

End: Letters, underscores, dollar characters, numbers

Key words

    

Data type

  

Data output

  

Shaping constants

Decimal "12", Hex "0x12", octal "012", long definition, plus l

Floating point Type

Default Double,float append f[f]

Character

Single quote, Unicode code representation, Unicode encoding one character for two bytes

\u0030:unicode encoding, 306 binary-represented characters

Char ch1= ' in ';

Char ch2= ' \u4e2d ';

System.out.printf ("%c%c\n", CH1,CH2);

Boolean "Boolean"

C language, not 0 is true

Java language, explicit Boolean value

Range:

Byte:1 bytes, a byte 8 bits, which is 2 of the 7-square, to 2 7-time minus 1

Short:2 A

Int:4 A

Long:8 A

Float:4 A

Double:8 A

Char:2, using a Unicode code

Boolean:1 A

Type conversions

Low to High

Byte→char→int→long→float→double

Operator

  

Bitwise operators

Move right >>: For signed data, when you move right, the symbol bit is moved, when positive, the highest bit is 0, the highest bit is 0, and negative, the highest bit is 1, the highest bit is 1.

>>>: Whether the highest bit is 0 or 1, the left side of the shift is replaced by 0

<< and <<< in the same vein

Operator Precedence

  

Process Control

Order

Conditions: If, if...else if, switch

Loops: For, while, Do...while

Continue: Jump out of this loop, break: Jump out of the current loop

    

002-java Language Basics

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.