♦ Single-Line Comments in Java
♣ Example1: Single-Line Comments in Java
Line by line commenting is possible in Java.Below is the representation of Single Line comment.
Basic Syntax
// hi there, Iam single line comment
Syntax Explanation:
adding "//" before the code can comment that line of code.
In this example, Single Line is commented. Example
Input:
Output: