Results 1 to 7 of 7
- 01-27-2010, 04:37 AM #1
Member
- Join Date
- Jan 2010
- Posts
- 5
- Rep Power
- 0
-
No, most definitely not. Your goal should be to write code that is "self-commenting" where the variable and method names are so logical that they almost make it obvious what is going on. You should comment most methods, especially public ones, anything that may be confusing, and anything that your instructor says should be commented.
Major portion of my code repeats the same thing over and over again.Last edited by Fubarable; 01-27-2010 at 04:57 AM.
- 01-27-2010, 05:21 AM #3
Member
- Join Date
- Jan 2010
- Posts
- 12
- Rep Power
- 0
What Fubarable is on point, but if actual commenting
Java Code://comment goes here
- 01-27-2010, 05:55 AM #4
Member
- Join Date
- Jan 2010
- Posts
- 5
- Rep Power
- 0
- 01-27-2010, 05:56 AM #5
Member
- Join Date
- Jan 2010
- Posts
- 5
- Rep Power
- 0
- 01-27-2010, 07:30 AM #6
Senior Member
- Join Date
- Oct 2009
- Location
- California,US
- Posts
- 201
- Rep Power
- 11
if it may help
Java Code://comment 1
Java Code:/* */
Java Code:/** */
- 01-27-2010, 10:26 AM #7
Moderator
- Join Date
- Apr 2009
- Posts
- 13,541
- Rep Power
- 26
I have a tendency to comment as part of the design (which goes back to the days when I had to do sequence diagrams). So a key method would look something like this before I even added any code to it:
Java Code:public void processSomething() { // First get the data. // loop over it. // call the thing. // call the other thing. // finally send data somewhere else. }
Similar Threads
-
How to generate comment or javadoc in java file ?
By Tonny in forum Advanced JavaReplies: 2Last Post: 01-03-2010, 06:49 PM -
How to strip out comment tags
By mr.vinnie in forum New To JavaReplies: 3Last Post: 09-30-2009, 03:12 AM -
URL/comment problem
By Chasingxsuns in forum New To JavaReplies: 4Last Post: 07-25-2009, 04:10 AM -
About Comment By Using SAX
By tapas in forum XMLReplies: 1Last Post: 01-24-2008, 06:29 AM
Bookmarks