Java String Quotation Limit

Is there any way in Java to use a special delimiter at the beginning and end of a line to avoid the need to flush back all quotes inside that line?

i.e. no need to do this:

String s = "Quote marks like this \" are just the best, here are a few more \" \" \""
+5
source share
4 answers

No, there is no such option. Unfortunately.

+6
source

No - there is nothing like C # string literals or Groovy slashy strings, for example.

, , . , - . , Java 7 , , Java 8... : (

+4

The only way to achieve this is to put your lines in another file and read it from Java. For example, a resource package.

+2
source

This is not possible at present, and may NOT be in the future.

if you can give us what and why you are looking for this function, we can defnitely offer several alternatives

0
source

All Articles