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,409
  • 3
  • 33
  • 51

2 Answers2

0

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

kosa
  • 64,776
  • 13
  • 121
  • 163
-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
  • 7,836
  • 7
  • 34
  • 58