Literal String using "@" in Java?

In C#, there's a way to tell the compiler to interpret a string literally, without consideration of escape characters.

string myStr = @"Some literal string, \ doesn't need to be escaped";

Is something like this possible in Java?

Jon Skeet
people
quotationmark

What you're referring to in C# is a verbatim string literal, as opposed to a regular string literal like "foo" - both are string literals, just as "foo" is a string literal in Java, too.

No, Java doesn't have any similar feature.

It also doesn't have any equivalent to the string interpolation feature being introduced in C# 6, with "x={x} y={y}" for example.

people

See more on this question at Stackoverflow