WriteCodeMany people have a principle. The code automatically generated by the IDE is generally readable and typographical. The most important thing is that there will be no low-level errors. Today we will introduce several common operations that are completed by eclipse in the eclipse environment. First, local variables are often used during implementation. The initialization values of these local variables come from some methods of some objects. Because of the high priority of local variables in the method, the same name can overwrite the scope. You can directly enter the method name to automatically generate local variables, as shown in:
Step 1: Enter the method directly. Of course, you can use the shortcut key Alt +/to automatically complete:
Step 2: press Ctrl + 1 to bring up the displayed dialog box:
Step 3: the dialog box generated in step 2. The first is to generate local variables, and the second is to generate the scope of the class. Here, select one to automatically generate the class.
In eclipse, if you encounter forced conversion, you do not have to enter it yourself. Enter the expression directly. Press Ctrl + 1 to automatically add the forced conversion function. If you can enter less, you will have less input, which is efficient and accurate. Why not.
PreviousArticle, Eclipse usage and skills 17: override the parent class method:
Http://blog.csdn.net/ts1122/article/details/9152963
In the next article, Eclipse's usage and skills 19: Eclipse's workspace modification:
Http://blog.csdn.net/ts1122/article/details/9325023