Hi all! This short article will be useful for beginners who have just encountered comments in java.
Comments are used to highlight text or parts of code in the code so that the compiler does not see them. Example with line selection:
System.out.println("Java");
//вот этот текст компилятор не видит
The result will be:
Java
Example with selecting several lines:
/*
Пример простой программы на Java
*/
public class Class
{
public static void main (String [] args)
{
System.out.println("Java");
}
In this case the result will be the same. Let's conclude: //
- a line is commented out /*
*/
- several lines are commented out Thank you for your attention!
GO TO FULL VERSION