Comments

Comments enable you to place information about the program within the program. These can be useful to programmers when they are revisiting the code because it helps them understand what is happening in the source code. Java supports three types of comments:

  • Traditional C-style comments— Traditional C-style comments are placed between /* and */. For example,

    /**
     *  The Constructor is used to instantiate the User Interface.
     *  This is a traditional C-style comment.
     **/
     public JdbcDml(){
        m_JdbcGui = new JdbcDmlGui(this);
        m_JdbcGui.setVisible(true);
     }
    
  • C++ style comments— C++ style comments begin with // and end with the current line of source code. Such comments are useful for quickly commenting on the current line of code. For example

     // Delete ...

Get e-Commerce Applications Using Oracle8i and Java from Scratch now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.