Good programmers Java Java technology tutorials to share knowledge summary

  Good programmers Java tutorial Share Java technology knowledge summary , zero-based how to learn Java? Here's a look at common foundation interview Java knowledge summary technology.

 

  First, the main Java configuration environment variable. Build a good environment to work. To understand what is compiled and what is running. Compile Javac.exe program in charge ; run by Java.exe responsible. The resulting compiled bytecode file xxx.class; Run xxx.class after is obtained xxx.java . The file name of the bytecode with the public modified class of the same name, only the ; however xxx.Java file and wherein each of the class corresponds, one to one, is not unique.

 

  Second, the Java basic data types of four eight kinds Boolean , byte , char , Short , int , Long , a float , Double , and various operators. The follow-up study to the reference data type headache. For example the first contact is a typical array of reference data type. In my opinion, the basic data types with reference data types a big difference: the former is defined for each variable can store only one value, while the latter definition of each variable can store multiple values. The secret of it here.

 

  Third, the flow control statements, basis functions. Java programs are the next line from the top line of the code, sometimes you need to perform different code, there is a case separately depending on the conditions, when you need to repeat the same code, which requires the control statements. Common flow control statements include branch statement, loop statement. Branch statement is divided into if and switch statements, loops divided the while \ a do..while \ for . Whether branched or cyclic, can sequentially execute multiple statements, or nested execution, or perform multiple nested. Typical of the multiplication table and can be achieved by diamond loop. And the function is divided: modifier, the return value, the function name ( parameter block ) { method blocks } . Note here that the defined functions can not be nested, i.e., another function can not be defined in a function, but the function calls can be nested, i.e., a function can call another function.

 

  Fourth, the function call, parameters, return values, local variables and global variables. Function call can not call each other, so causing the death cycle ; likewise, can not easily function call itself. Because there are special circumstances, and that is recursive ! Its essence is a recursive function calls itself. But we must give it to set conditions to break the cycle of death !

 

  Fifth, the array. The basic algorithm is that bubble sort, selection sort, general search, binary search. Arrays are learning Java reference data type in the first encounter. Any previous array with a basic data type is different, a variable which can be defined by a number of stored values. And all operations of the variable is no longer a direct manipulation of the stored value. But operated by an index identifying each element. This value is passed to the said site and passed.


Guess you like

Origin blog.51cto.com/14573321/2455506