Possible Duplicate:
How do I make a string with a ” character in it? (Java)
I am having trouble printing a string like this in java System.out.println("this is a "test""); How can I go about this?
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.
This is what you are looking for:
The
\is called the escape character.It is used to embed special characters into a
Stringliteral.\n= newline\t= tab\f= form feed\r= carriage return\"= double quote\\= backslashthis is just a few of the special characters you can insert with an escape sequence.