Eclipse usage and tips 7: automatically generate get and set method 2

Source: Internet
Author: User

In the previous article, we introduced how to automatically generate get and set functions in batches. This method is generally used after the data fields of the class are declared, which is convenient and quick. Here we will add several methods to automatically generate get and set functions.

Step 1: press Ctrl + 1 in the declared data field:

Step 2: Click Create getter and setter, and click OK in the pop-up dialog box:

 

Introduce another method:

Step 1: After declaring the data fields of the class, enter set and press and hold Alt + /:

Step 2: Enter get and press Alt + /:

 

 

In the previous article, eclipse usage and technique 6: automatically generate get and Set Method 1:

Http://blog.csdn.net/ts1122/article/details/8852555

In the next article, eclipse usage and tips 8: automatically add try/catch1:

Http://blog.csdn.net/ts1122/article/details/8886219

 

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.