Java single line comments.

Java Programming Java8Object Oriented Programming

// is used for single line comments.

Example

Live Demo

public class MyFirstJavaProgram {
   public static void main(String[] args) {
      // This is a single line comment.
      System.out.println("Hello World");
   }
}


raja
Updated on 05-Mar-2020 12:41:00

Advertisements