java basics of variables and data types

           Javase courses

A: Programming Specification

Name anywhere needs to see to know the name of Italy;

Code proper indentation

The process of writing the pair programming

The code is reasonable comments

Two: keywords and identifiers

One

1 : Keyword is to be java character gives special meaning

2 : features all lowercase

  1. Note: GOTO and const as a reserved word
  2. As notepod Senior keywords such as Notepad will have a special color-coded

two:

Identifier ;

  1. Definition: it is a class variable interface to obtain the name of the character sequence method
  2. Composition rules: capitalization is not recommended Chinese
  3. Notes can not start with the numbers  can not be the key note case
  4. Common naming convention: Big Hump small hump constant in all caps

II: Notes :

  1. Program for word of explanation
  2. Category  single-line comments //   Multiline comments / ** /

Three . Constants and Variables

  1. Constant defined the same amount in the program run
  2. Variables defined amount in the program run can be changed
  3. The use of variable stock for quantity
  4. Focus variable  variable type variable name variable value variable scope
  5. Note the use of variables must first define a variable first assignment after use  to be in the scope of

IV.  Data Types

  1. The definition of java is a strongly typed language data are provided for each data type
  2. Categories basic data type four eight kinds of  reference data type classes interfaces array
  3. Basic data types Integer byte short int long float float double
  4. Char char   Boolean boolean

Five: data type conversion

  1. boolean does not participate in the conversion
  2. The default conversion from an early age greatly
  3. Cast descending  different data types or small to large data transfer may occur loss of accuracy and loss of data,

Six . Escape character

\ ': Represents a single quote

\\: Represents a backslash character "\"

\ ": Represents a double quote character

\ b: backspace , is to move the cursor to the previous character of the current character is not

It deletes the current character.

 

Guess you like

Origin www.cnblogs.com/jieluote/p/11110192.html