I know that it is possible to write double quotes in Java strings by putting \ symbol before them. But if double quotes are used a lot in a string, is there a way to mark the string once, so there won't be a need to write the \ symbol before each? (just like in C#, it is possible to put the @ symbol before the string)
Example:
String quotes = @"""""""""""""""""""";
instead of
String quotes = "\"\"\"\"\"\"\"\"\"\"\"";
解决方案
You can't. But if you are too lazy to escape each of the double quotes, there are some trick that can do that. For example:
String quotes = "....................".replace(".","\"");
System.out.println(quotes);
output: """"""""""""""""""""