-------Android Training,Java TrainingWe look forward to communicating with you!
----------
Today, I took a course from instructor Zhang. He started from the most basic lectures, such as Eclipse and IDE (integrated development environment), as well as Eclipse View Management andProgramDebugging, there is a Java TemplateCodeIn Java, a project is created in a single space. If you modify some system attributes and templates of Java, it is only useful in the current workspace. If you change the workspace, You have to modify it again.
To import an existing project in eclipse, perform the following steps: 1. Put the project to be imported in your current workspace. 2. Select the project to be imported in eclipse.
Java static import is used as an example: Import static. java. lang. math. * When you import this class, if you need to use the static method in math, you should not use math. the method name is used, but the method name is used directly. This is the benefit of importing static classes.
Variable parameters refer to the ellipsis (...) that appears in the method (...) for example, the method name (int x, int... arrg), variable parameters in the method body are used as arrays, for example, arrg [].
The following example shows an enhanced for loop: For (type variable name: Set variable name:
Int [] numarray = {3, 6, 8}; For (INT num: numarray) {system. Out. Print (Num );}
Automatic unpacking and packing refer to the 8 Basic Data Types in Java, for example, integer a = 1; that is, automatic packing means that integer 1 is encapsulated into an object. In fact, unpacking is to extract 1 from the object and perform integer operations, for example:
// Binning integer num = 10; // unboxing int num1 = num;
Enum (enumeration) is a new feature supported by Java 5. It defines a set of related constants in a type so that only these finite constants can be used during use. Example:
Enum weekday {Sunday, Monday, Tuesday, wednsday, Thursday, Friday, Saturday };
The above Code defines seven constants in the weekday enumeration class. Note that the last semicolon can be omitted. If you want to add a method in it, you must add a semicolon, it must also be written under the seven constants; otherwise, an error is reported. Because weekday has only seven members, weekday variables can only take one of them.