aspose file tools
The moose likes Beginning Java and the fly likes Commenting code Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of Mongo DB Applied Patterns this week in the MongoDB forum
or a resume review from Five Year Itch in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Beginning Java
Reply Bookmark "Commenting code" Watch "Commenting code" New topic
Author

Commenting code

Wade Broke
Greenhorn

Joined: Jan 18, 2010
Posts: 1
Can someone tell me if there is a standard for commmenting code (to produce javadocs and in general)

Some examples would be good if there is a standard for this

or some commenting of this code would be helpful

/**
*
* @author Wade B
*
*/
public class roundRobinScheduler
{

/**
*
*
* @param args
*/
public static void main(String[] args)
{

process p1 = new process( "First Process", 10 );
process p2 = new process( "Second Process", 14);
process p3 = new process( "Third Process", 30);
process p4 = new process( "Fourth Process", 7 );

process[] allJobs = { p1, p2, p3, p4 };

boolean allProcessesComplete = false;



int currentJobIndex = 0;

while( !allProcessesComplete )
{
if( !allJobs[currentJobIndex].complete())
{
allJobs[currentJobIndex].processTimeslice(1);
try
{
java.lang.Thread.sleep(500);
}
catch( Exception e)
{

}
}


currentJobIndex++;


if( currentJobIndex >= allJobs.length)
{
currentJobIndex = 0;
}

if( p1.complete() && p2.complete() && p3.complete() && p4.complete())
{
allProcessesComplete = true;
}


}

}

}
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 8430

Welcome to the Ranch.
You might find this useful http://java.sun.com/docs/codeconv/


[Donate a pint, save a life!] [How to ask questions] [Onff-turn it on!]
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19214

how to write affective comments in java class file?


SCJP 1.4 - SCJP 6 - SCWCD 5
How To Ask Questions How To Answer Questions
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 32599
    
    4
Welcome to the Ranch

You will find your code easier to read if you use the "Code" button.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Commenting code
 
Similar Threads
JPanels with different content should have the same size
trouble with layouts
So difficult to use Layout managers!!!
White bars on bottom and top of JFrame
drawing a curve from points