में सी # के उद्धरण (@ "") पर सी # के समान कुछ उपयोग करने का कोई तरीका है, यदि आप पात्रों से बचने के बिना स्ट्रिंग को पढ़ना चाहते हैं, तो आप एट-कोटजावा
का उपयोग कर सकते हैंString file = @"C:\filename.txt"
जो
String file = "C:\\filename.txt"
के बराबर है वहाँ जावा में एक पूरे स्ट्रिंग से बचने के लिए एक आसान तरीका है?
संभावित डुप्लिकेट http://stackoverflow.com/questions/2673855/java-equivalent-of-cs-verbatim-strings-with और http://stackoverflow.com/questions/2018556/does-java-have-the -character-to-escape-string-quotes/2018583 – nan