java - Change how the compiler parses the string -
this question has answer here:
in c#, @ sign used before string literals change how compiler parses string. there counterpart of in java? using concatenation confuses me sometimes.
strings cannot on multiple lines in java. editor may automatically wrap them, string cannot on multiple lines - is, don't hit enter in middle of string literal.
if want string contain new line, use \n ex
system.out.println("line 1\nline 2");
results in
line 1 line 2
Comments
Post a Comment