What is the following code execution result?

public class Commentator {
    public static void main( String[] args ) {
    /*System.out.println( "Line1" );
      System.out.println( "Line2" );*/

    //System.out.println( "Line3" );
    System.out.println( "Line4" );//

    System.out.println( "/*Line5*/" );
    System.out.println( "//Line6//" );
    }
}
Explanation
Comments in Java:
Line end - starts with //
Multiple lines - starts with /* ends with */

Single-line comment // is not considered a special character within a string constant.

Follow CodeGalaxy

Mobile Beta

Get it on Google Play
Send Feedback