Api:application Program Interface programs call a method to implement a function regular expression: The regex is used to match the Java EE inside there are three big framework SSH struts Spring hiberate java C + + j Ava C language 32 reserved Keywords
Data type
Raw data type (primitive)/base data type
Bit 8bit=1byte (bytes) class byte code bytecode
Java in four class eight kinds 1, the numeric type Byte 2 7 Time Square 1 bytes-2 7 times to positive 2 of 7 times -1-128 ~ 127 Short 2 15 (positive) 2 bytes three-way int 2 of 31 times 4 bytes long 2 of 63 times 8 bytes 2, text Char 2 15-bit 2 bytes 3, float float double 4 bytes 8 bytes 0.0f 0.0 4, logical Boolean (Boolean) True false in C language can be with 0 and 1 permutations in Java not 1/8 bytes
A variable is an abstraction of a variable operation property that is an abstract data type stored in a program's Data 1. Number of tables range 2. Type of operation applied
Reference data type (reference)/compound data type array class interface interface
Possible loss of precision when defining variable data type error
Literal: The literal of the numeric type is the literal of the int floating-point type, which is the cause of the double error: type conversion exception. The concept of an error identifier for a large type of data conversion to a small type of data: class public static interface int the naming specification: Class name and method name and variable name specification: The constituent contents include: characters (Letters and symbols) numeric underline $ composition, but not by number Word begins! Naming method: Java Hump nomenclature c Hungarian Nomenclature requirements for classes and methods The first letter of the class name must be capitalized class for the method lowercase, but the method name consisting of multiple words starts with the first letter of the second word eg:binarysearchint binary find
Note: The note is not for the machine to see, it is for people to see!
Java in a total of three comments////single-line comments, multiple lines of comments (paragraph comments), document Comments (is a special multi-line comments)//comments in the program will not be translated//single-line comments:////paragraph comments/* Start/end// Paragraph comments cannot be nested
Document Comment/** start/end the compiler encounters the beginning of a paragraph note and treats everything until the end of the paragraph mark as a comment//early-closing question paragraph comments are inherited from C + + for single-line comments and paragraph comments and document comments: Javadoc with purpose annotations Importance: An excellent program requires a 3-minute comment constant: The amount of the variable that does not change: the equivalent of a box, can be stored in the value of the system at any time the performance: 10 165 128 binary 0x means 16 binary 0x123
BYTE B1=3,b2=4,b; B=B1+B2; b=3+4;
Add: Sort all data types (by bytecode) byte,short,char-->int-->long-->float,double if the conversion of a high type to a low type will occur type conversion exception
========================================================== Summary: Assignment number to the right of things: 1, is the variable 1, low-type and high-type mutual operation must be high-type Byte+int=int 2, the same type, depending on the literal. 2, is constant, check whether the constant value exceeds the range of tables
BYTE B1=3,b2=4,b; B=B1+B2; b=3+4;
operator, Process Control and/or non-multiplication + the other side of the Thing & && difference True & False True | False truth
&& just look to the left of left is false right do not look, Direct is False | |
Process Control: Four kinds: Sequential structure, select (if), Loop (while,for) if/else, switch statement note 1:switch statement to be careful of anti-penetration switch case:break default: (Default) Note the data type that the 2:switch statement receives is a short int byte array enumeration (enum), and the character cannot receive a long loop: the For and for (initialization; judgment; increment) has a definite loop count when the while (condition) has a definite end condition with the While loop for loop and while loop can replace
Simplest infinite loop for (;;) while (true)
Self-increment auto-decrement operator
Priority level:
Unary operators > Two-ary operators > Ternary operators
+-*/% two operator a+b
++i i++ self-increment operator
Format:? : Three mesh operator if condition judgment makes the difference to some extent interchangeable. The condition of judgment? The statement that determines the execution: the statement that determines the execution of the failure
Character form char type is caused by ' ', string type is enclosed in double quotation marks
Add: operator Order of operations
= assignment operator in language mathematics = = Double equals is the language = a=10; a==10; Determines whether a is 10
= The assignment operator has the lowest priority, followed by the binocular operator, and the unary operator operator is required to produce results if the output of my operation is not a result, it must be returned with a definite output, before it can be interchanged.
Escape character
\ nthe newline \ t horizontal tab \v vertical tab \ \ Slash
Some characters that begin with the \ flag are escape characters \u57899
jdk1.5 after packing class. Automatic unboxing
=========================================================
Object oriented
Encapsulating inherited polymorphism
Encapsulation: The data is wrapped up. Property and method Inheritance: subclasses inherit from the parent class small inheritance large, but small larger than the content to enrich the extends polymorphism: with inheritance only polymorphic, subclass and parent class of mutual transformation
Process-oriented, why is it replaced?
is not all the methods to write their own, not conducive to the development of the program
And for process-oriented: time-saving
Object oriented: Everything objects
Encapsulation: Methods (actions) and attributes (intrinsic State)
Object: New object, second call with static method
Javase Basic Primer Review Note two