+ 3
How can we add ")" into a string?
I want to write a code that prints out ": )" when it runs. I tried this code: System.out.print(": )") But the Code Playground keeps pairing the ) between the quote marks with the ( before the quote marks. Does anyone have solution?
4 ответов
+ 4
Workaround for now:
char close_bracket = ')';
System.out.print(": " + close_bracket
+ 5
Although Code Playground seems to "think" that the right parenthesis in the double quote is paired to the first left parenthesis, it isn't.
System.out.print(": )");
works just fine. Nonetheless, you can provide a feedback to SL in order for the devs to quickly rectify this issue.
+ 5
Thank you...
: )
+ 4
Xan Oh my god I didn't think about that
: )