The second chapter of Java Programming Ideology (Third Edition) told the "all things". When you create an object in Java, you will be placed in a stack when you use NEW, and aprimitive data type is placed in the stack from efficiency.
About the scope, the following code: /// {int x = 125; {INT x = 34; // illegal}} In C / C , this is no problem, this is called a scope shield (it is called Why?), But in Java is illegal, it is indeed a good way to avoid ambiguity.
Then learn some nouns, including Gabage Collector, Class, Data members, methods, default values, parameters, return values, parameter lists, many are the same or similar to C , and learning is not very Father.
It is a name space, and Java designer uses a reversed domain name to solve this problem as the name of the class library, because the domain name is unique, so you can avoid the problem of renowning. (A little feeling, but still need to practice to really understand.)
Then two nouns Import and Static, the previous one has just been faulty, and the latter is also very simple. The author then uses a program to teach us to use Java Document, this thing is a very good thing, a good thing to do good things, must first make a tool, Java's tools look, there is a big impulse, I also found a CHM version of a JDK document, don't have a taste, huh, huh.
"Java has some good ideas, one is that writing code is not the only important thing - the production document is at least important to him." (I am deeply agreed to this sentence, because I am enjoying no documentation The program is destroyed to me ~)
Regarding the use of Javadoc is very many, of course, the document that is produced is also very beautiful. However, now it is not the focus of my study, I remember such a thing.
The author then talked about the programming problem, except for the use of the curb, all other, others can. -_- b
Next, I have gone to the third chapter of Java Programming Ideology (Third Edition), now there is still time, continue.
Java operators are basically the same as other programming languages, the priority is also, but many people can't remember, don't matter, you can use parentheses.
Java's object added, it needs to be said, it is still refrence (this translation Java thought third edition author did not translate the word, is it the translation of this word now there is a controversy? Since C is called it, We also call it to reference it, can it be the role of the reference, including the value of Java, is also the refretence, not a value.
Regular expression
The second chapter of Java Programming Ideology (Third Edition) told the "all things". When you create an object in Java, you will be placed in a stack when you use NEW, and aprimitive data type is placed in the stack from efficiency.
About the scope, the following code: /// {int x = 125; {INT x = 34; // illegal}} In C / C , this is no problem, this is called a scope shield (it is called Why?), But in Java is illegal, it is indeed a good way to avoid ambiguity. Then learn some nouns, including Gabage Collector, Class, Data members, methods, default values, parameters, return values, parameter lists, many are the same or similar to C , and learning is not very Father.
It is a name space, and Java designer uses a reversed domain name to solve this problem as the name of the class library, because the domain name is unique, so you can avoid the problem of renowning. (A little feeling, but still need to practice to really understand.)
Then two nouns Import and Static, the previous one has just been faulty, and the latter is also very simple. The author then uses a program to teach us to use Java Document, this thing is a very good thing, a good thing to do good things, must first make a tool, Java's tools look, there is a big impulse, I also found a CHM version of a JDK document, don't have a taste, huh, huh.
"Java has some good ideas, one is that writing code is not the only important thing - the production document is at least important to him." (I am deeply agreed to this sentence, because I am enjoying no documentation The program is destroyed to me ~)
Regarding the use of Javadoc is very many, of course, the document that is produced is also very beautiful. However, now it is not the focus of my study, I remember such a thing.
The author then talked about the programming problem, except for the use of the curb, all other, others can. -_- b
Next, I have gone to the third chapter of Java Programming Ideology (Third Edition), now there is still time, continue.
Java operators are basically the same as other programming languages, the priority is also, but many people can't remember, don't matter, you can use parentheses.
Java's object added, it needs to be said, it is still refrence (this translation Java thought third edition author did not translate the word, is it the translation of this word now there is a controversy? Since C is called it, We also call it to reference it, can it be the role of the reference, including the value of Java, is also the refretence, not a value.
Regular Expressions have made me very headache in the course of the operating system, I met when I saw C # a few days ago, I didn't expect it to see it today, it is really avoided. Here is a method of describing a string with a general term.
The plus number of the unit and the reduction, self-increment, and self-reduction, and the relationship operator.
Even the cake. Today, this (Regular Expressions once appeared in the operating system's class, I have a headache, I have encountered it when I see C # a few days ago, I didn't expect to see it today, it is really avoided. Here is a method of describing a string with a general term.
The plus number of the unit and the reduction, self-increment, and self-reduction, and the relationship operator.
Test object's equality: although == and! = Can be used for all objects, but the resulting results are not necessarily what you want. In addition to the original data type, == and! = Both two objects are compared to the two objects of the reference, and we generally compare the content of the object, we can use the equals () method, but the method is still a comparison object in the Object base class. Reference, so you should implement this method when you compare your own class. It is good to implement the method in the vast majority of Java class libraries, and we only use it. Short, bit operators, shift operators, three-yuan operators (? :), comma operators (Java only have applications in the for loop), String operators (automatic conversion).
Common use operators: while (x = y) {// do something}, oh, in C will not care about the mistake, Java will not appear, because the boolean in Java is False and True , Not 0 and non-0;
Type conversion: When the wide bit value is converted to a narrow bit value, Java requires you to make a clear display conversion otherwise an abnormality, thereby avoiding accidental errors.
Java has no sizeof (), and the things that have been speeched in the big section in "C high quality programming" finally have been clarified, really cool.
Control statement: if Else; for; while; do while; for (only for statement has the ability to define variables in "Control Expression", don't do this in other selection statements or cycle speech. Although variables can be defined But it can only be the same type); BREAK (jump out of the current loop); Continue (immediately enter the next round of loop); while == for (;;); switch case;
Goto later: C programmers are prudent to use it when they are worried about GOTO, or simply do not have, but sometimes it will have a good effect in place, (but I haven't used it yet. Java finally abandoned this double-edged sword while providing another similar functionality in order to make some appropriate role in proper places. Label ./// Label1: Outer-ity {inner-ity {// ...... Break; // Case 1 // ... Continue; // Case 2 // ..... CONTINUE LABEL1; // Case 3 // ... Break Label1; // Case 4 // ...}} / In Case 1 Break interrupt the internal loop, refunded to the external loop. CRS 2 Continue is still in the internal circulation. In the case 3 of Continue to Label1, restart the loop. The case 4 retired to Label1, but this time no longer entered the loop (incredible).
The above rules are equally applicable to the While cycle.
OK, now here, learn hidden realization tomorrow, the initialization and cleanup of the object.