Eclipse usage and tips: automatically add unimplemented method 1

Source: Internet
Author: User

JavaCodeSome interfaces are often implemented, which is unique to Java code. To implement an interface, you need to implement the methods defined in this interface. If you decode the methods one by one, you need to remember the method name and so on. Even if you have content-assisted shortcut keys for help, it is very troublesome. Here is a small trick to quickly implement all methods defined by the interface in the current class, of course, they are all empty implementations. :-D
Step 1: first code out the interface to be implemented

Step 2: place the cursor on the row of the Declaration class and press Ctrl + 1 to see the prompt for implementing all methods.

Step 3: select to implement all methods. This class generates an empty Implementation of the method in the interface, and then implement it again as needed, which is more convenient.

 

 

PreviousArticle, Eclipse usage and skills 14: automatically generated todo NOTE 2:
Http://blog.csdn.net/ts1122/article/details/9009217
Next article, eclipse usage and tips 16: automatically add unimplemented Method 2:

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

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.