- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
/** and /* in Java comments
Java supports single-line and multi-line comments very similar to C and C++. All characters available inside any comment are ignored by Java compiler.
/** is known as documentation comments. It is used by Javadoc tool while creating the documentation for the program code.
/* is used for multi-line comments.
Example
/** * This is a documentation comment. * This is my first Java program. * This will print 'Hello World' as the output * This is an example of multi-line comments. */ public class MyFirstJavaProgram { public static void main(String[] args) { /* This is an example of multi line comment. */ System.out.println("Hello World"); } }
- Related Articles
- Java comments.
- Executable Comments in Java
- Comments in Java\n
- Java documentation comments
- What is the difference between /* */ and /** */ comments in Java?
- Types of Java comments.
- Java single line comments.
- Java multi-line comments
- What are comments in Java language?
- Best practices for Java comments.
- Pattern COMMENTS field in Java with examples
- How to add different comments in the Java code?
- Comments in Python
- Comments in C#
- Comments in Perl

Advertisements