Create a new Java class How to set the author @author

Source: Internet
Author: User
Tags class definition

1, in NetBeans:

Please check: http://blog.csdn.net/adali/archive/2009/02/20/3914072.aspx


2, in MyEclipse:

Mode one:
MyEclipse automatically insert author, annotation date, and so on de shortcut keys open and then find Window-->preferences->java->editor->templates,
Here's a new shortcut name for your own insert note, which is set as follows:
Name to enter Author1 (any name you like)
Context Select Java behind tick automatically insert check box
Description Here you can enter any description
Pattern:(more)
/**
* @author ${user}
* @date: ${date} ${time}
*/




All set up here, below OK, find a Java class, find a blank place to test, enter Author1 (the name of the previous write),
Then alt+/
should click to see the content of the pattern just now.

Mode two:

This on the class definition line plus/** and then press the shortcut key ctrl+/OK.


Third, when you create a Java class, you automatically bring information such as the author.


Effect Chart:





Recommendation: Adopt A Third Way ...

Over ...


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.