Eclipse usage and tips 18: reduce unnecessary input

Source: Internet
Author: User

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.