0

Possible Duplicate:
Raw Strings in Java?

In C# there is such a thing as @ ("at sign") that can be put before string if forbidden symbols occurs. For example:

@"a\b\c"

In java I have to put backslashes

"a\\b\\c"

Is there any way in Java to make this easier?

Community
  • 1
  • 1
kolobok
  • 3,835
  • 3
  • 38
  • 54

2 Answers2

0

Another way may be use equvivalent code for the symbols you want to escape.

kosa
  • 65,990
  • 13
  • 130
  • 167
-1

Not really. I have made the transition not long ago and at first was constantly looking for "what is C#'s equivalent in Java for xyz?"

This is sometimes helpful but mostly frustrating. C# is a much more advanced language than Java and it will take a long time for Java to catch up.

You get used to it over time :-)

Vitaliy
  • 8,044
  • 7
  • 38
  • 66