This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Java Interview Guide and have Anthony DePalma on-line!
See this thread for details.
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes comment on ActionListener Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "comment on ActionListener" Watch "comment on ActionListener" New topic

comment on ActionListener

kevin chang
Ranch Hand

Joined: Mar 08, 2003
Posts: 64
i am using follow codes

but i am wondering should i write comments on ActionListerner class and it's actionPerformed() method, any suggestion!

Sun Certified Java Programmer, Sun Certified Java Developer. <br />Strving to be a real architect.
Andrew Monkhouse
author and jackaroo
Marshal Commander

Joined: Mar 28, 2003
Posts: 11778

Hi Kevin,
Standard rules apply ... if you think that the code is self explanitory, and can easily be understood by a junior programmer, then dont worry about comments.
But if there is even a chance that a comment or two will make the code easier to understand, then add a comment.
Moving away from your question, why have you marked your code block as transient?
Regards, Andrew

The Sun Certified Java Developer Exam with J2SE 5: paper version from Amazon, PDF from Apress, Online reference: Books 24x7 Personal blog
Jim Yingst

Joined: Jan 30, 2000
Posts: 18671
Note that there's no need for javadoc comments here. That is, there's a rule that all public methods must have javadoc comments - but that doesn't apply to methods of an anonymous class, since an anonymous class will not appear in javadoc's generated HTML API at all. So forget about javadoc comments here. Non-javadoc comments may still be appropriate, as Andrew suggests.

"I'm not back." - Bill Harding, Twister
I agree. Here's the link:
subject: comment on ActionListener
It's not a secret anymore!