There are three types of comments in Java.
1. single line comment
2. multi line comment
3. java documentation
Single Line Comments:
These comments are for making a single line as a comment. These comments start with double slash symbol // and after this, whatever we written till end of the line is taken as a comment.
Example:
//This is my comment of one line.
Multi Line Comments:
These comments are used for representing several lines as comments. These comments start with /* and end with */. In between /* and */, whatever is written is treated as a comment.
Example:
/* This is a multi line comment. This is line one. This is line two of the comment This is line three of the comment. */
Java Documentation Comments:
These comments start with /** and end with */. These comments are used to provide description for every feature in a Java program. This description proves helpful in the creation of a .html file called API(Application Programming Interface) document. Java Documentation comments should be used before every feature in the program as shown here:
/** description about the class */ Class code{ /** description about a method */ Method code(){ } }
Strategy Design Patterns We can easily create a strategy design pattern using lambda. To implement…
Decorator Pattern A decorator pattern allows a user to add new functionality to an existing…
Delegating pattern In software engineering, the delegation pattern is an object-oriented design pattern that allows…
Technology has emerged a lot in the last decade, and now we have artificial intelligence;…
Managing a database is becoming increasingly complex now due to the vast amount of data…
Overview In this article, we will explore Spring Scheduler how we could use it by…