Printing "special" characters with java
I want to println
System.out.println("*_data<*>" text;");
as *_data<*> text;
and also write this to a file. I can't even 开发者_如何学Cget it to write to console because of errors...
You have a "
after <*>. That is causing the error. If you want to print the literal text
remove the ". If not replace that quote with a + sign and remove the last quote.
simply try:
System.out.println("*_data<*>\" text;");
精彩评论