Contact Us || Privacy Policy || About Us |
|
Comments in Javacomments are used to hide the program code, such as It provide the information or explanation about the variable, method, class or any statement. Types of Comment in Java
1) Single Line Comment in JavaDouble forward slash are used in a single line that is called Single line comment is Single Line Comments (SLC). Syntax: Example: Output ![]() 2) Multi Line Comment in JavaMulti line comment is used to comment multiple lines of code. Syntax: Example: Output ![]() 3) Documentation Comment in javaDocumentation comment is used to create documentation API. To create documentation API, you need to use javadoc tool. Syntax: Example:
Next TopicOOPs Concepts in Java
|