Tuesday, 28 August 2012



As you can see, even the Java class requires several lines of codes and contains somewhat perplexing syntax. Large applications that perform many tasks include much more code, and as you write larger applications it becomes increasingly difficult to remember why you included steps or how you intended to use particular variables. Documenting your program code helps you remember why you wrote lines of codes the way you did. Program comments are nonexecuting statements that you add to a program for the purpose of documentation. Programmers use comments to leave notes for themselves and for others who might read their programs in the future. At the very least, your Java class files should include comments indicating the author, the date, and the class name or function. The best practice dictates that you also include a brief comment to describe the purpose of each method you came within a class.



11 comments:

  1. please read our newly released magazine made for java. it's truly helpful. sample codes are available inside.
    Enjoy reading! :D

    ReplyDelete
  2. hey guys, you want to measure how good you are in JAVA ??

    Why don't you try this link ?

    http://www.ex-designz.net/test_page.asp?tid=47

    If you pass this quiz/test, you will pass OOP as well :)))

    ReplyDelete
  3. Click this link to know more about comments in java :

    http://java.sun.com/docs/codeconv/html/CodeConventions.doc4.html

    ReplyDelete
  4. These comments are advantageous in the sense that they make the programmer feel convenient to grasp the logic of the program. Although these comments are ignored by the Java compiler, they are included in the program for the convenience of the user to understand it.

    ReplyDelete
  5. yeah i agree. that's how java very helpful.

    ReplyDelete
  6. this is a tutorial... check this... :))

    http://docs.oracle.com/javase/tutorial/java/concepts/class.html

    ReplyDelete
  7. Every comment has the potential to create an inconsistency between what the comment says, and what the code does. One cause of "software rot" is that code is changed over time, but comments are not updated. To avoid this, keep comments next to the code that is documented so that they may be more easily synchonized. --JC.

    ReplyDelete