by Dinesh Thakur Category: Java Language

Comments are usually non executable statements which are meant for the programmers own convenience. A comment is usually explanation regarding the statement. There are three types of comments in java. They are:

 

1. Single line comment

2. Multi line comment

3. Documentation comment

 

1. Single line comment

 

Single line comment allows only one line. These comments must begin with //.

 

2. Multi line comment

 

If the comment exceeds more than one line, multiline comment is used. Multiline comment begin with /* and end with */.

3. Documentation comment

 

Documentation comment is used to generate document automatically. Documentation comment begin with /** and end with */.





About Dinesh Thakur

Dinesh ThakurDinesh Thakur holds an B.SC (Computer Science), MCSE, MCDBA, CCNA, CCNP, A+, SCJP certifications. Dinesh authors the hugely popular blog. Where he writes how-to guides around Computer fundamental , computer software, Computer programming, and web apps. For any type of query or something that you think is missing, please feel free to Contact us.