Monday, October 10, 2011

Challenge 016

System.out.print("\\* This is not\n a comment *\\");

The output of this statement is:

\* This is not
a comment *\


The \\ is an escape character which basically means that when two back slashes are inserted, only one is outputted when it is in a String[] statement.. The quotation tells the compiler to output the statement within itself. The reason that it is two separate lines is because of the \n . This tells the compiler to move the following characters to the next line.

1 comment: