Possible Duplicate:
Java equivalent of C#'s verbatim strings with @
An example in C# would be:
string path = @"C:\myfile.txt";
Another example is the answer to this question.
Java doesn't have pointers; Java has references.
Since the Java programming language does not provide the union construct, you might think there's no danger of implementing a discriminated union. It is, however, possible to write code with many of the same disadvantages.
Operators are special symbols that perform specific operations on one, two, or three operands, and then return a result. As we explore the operators of the Java programming language, it may be helpful for you to know ahead of time which operators have the highest precedence.
There is nothing equivalent to the @ symbol in Java - you must escape each and every backslash in a String literal.
String path = "C:\\myfile.txt";
// or "C:/myfile.txt";
// or "C:" + System.getProperty("file.separator") + "myfile.txt";
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With