Quick question. Is there an equivalent of @ as applied to strings in Java:
For example I can do @"c:\afolder\afile"
in C# and have it ignore the escape characters when processing instead of having to do "c:\\afolder\\aFile"
. Is there a Java equivalent?
hmmm: stackoverflow is escaping on me .. lol. The second example should read:
c:(double-backslash)afolder(double-backslash)aFile
C is a middle-level language as it binds the bridges between machine-level and high-level languages. Java is a high-level language as the translation of Java code takes place into machine language, using a compiler or interpreter. C is only compiled and not interpreted. Java is both compiled and interpreted.
These two languages are very similar in terms of syntax and language features. They are so similar that if you're shown some portion of C++ code from a project and asked whether it's C++ or Java code, you may confuse yourself.
The very first Java compiler was developed by Sun Microsystems and was written in C using some libraries from C++. Today, the Java compiler is written in Java, while the JRE is written in C.
C is a compiled language that is it converts the code into machine language so that it could be understood by the machine or system. Java is an Interpreted language that is in Java, the code is first transformed into bytecode and that bytecode is then executed by the JVM (Java Virtual Machine).
No. Escaping / externalizing the string is your only choice.
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