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