Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 3 of 3

Thread: Commenting in Java

  1. #1
    Member
    Join Date
    Oct 2011
    Posts
    114
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Commenting in Java

    In my assignment, 10% of marks is awarded for the commenting of the code.

    Are there special rules or regulations in java for commenting code?

    I want to pick up as many marks as possible


  2. #2
    Administrator copeg's Avatar
    Join Date
    Oct 2009
    Location
    US
    Posts
    5,318
    Thanks
    181
    Thanked 833 Times in 772 Posts
    Blog Entries
    5

    Default Re: Commenting in Java

    See the following link
    How to Write Doc Comments for the Javadoc Tool
    Its a bit text heavy, but provides the standard practice for commenting classes, methods, etc...and when followed allows the javadoc tool to spit out API docs for your classes in the same style that Oracle provides for their libraries. Not sure if it talks about commenting in code, but complex portions of code within methods should be commented as well to let one know what it is you are doing

  3. #3
    Crazy Cat Lady KevinWorkman's Avatar
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    5,424
    My Mood
    Hungover
    Thanks
    144
    Thanked 636 Times in 540 Posts

    Default Re: Commenting in Java

    You can also check out the JLS chapter on comments: The Java Language Specification Documentation Comments
    Useful links: How to Ask Questions the Smart Way | Use Code Tags | Java Tutorials
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

Similar Threads

  1. Why no emphasis on commenting
    By Norm in forum The Cafe
    Replies: 2
    Last Post: July 25th, 2011, 07:53 AM
  2. Mastermind commenting help needed! :)
    By Mahela in forum What's Wrong With My Code?
    Replies: 2
    Last Post: February 28th, 2011, 03:55 PM