Well that was pretty much my question, I need to do something like this:
String scriptContent = "print("Hello World")";
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You’re looking for something called an escape sequence, which is a way of telling Java to interpret a particular character as something other than what it means by default. In your case, you can make a Java string containing a double-quote by prefixing it with a slash:
There are many other escape sequences in Java. For example,
\\stands for a slash character itself (instead of the start of another escape sequence!);\'stands for a single quote; and\nstands for a newline. There are many others; consult a Java reference for more details.