This site requires JavaScript, please enable it in your browser!
Greenfoot back
Nosson1459
Nosson1459 wrote ...

2017/1/8

Text

Nosson1459 Nosson1459

2017/1/8

#
Is there any way (and what is it if there is) that I can include quotation marks (") in my text as they are the mark for the starting and ending point of text? I can do two apostrophes in a row ('') instead of a quotation mark (") but it's a little more spread out (even though in the post it's not).
danpost danpost

2017/1/8

#
Nosson1459 wrote...
Is there any way (and what is it if there is) that I can include quotation marks (") in my text
You could test this out:
String text = "abcde\"fghij\"klmno";
System.out.println(text);
See the section on escape sequences on this page of the java tutorials.
Nosson1459 Nosson1459

2017/1/8

#
Thanks.
danpost wrote...
You could test this out:
It's true that all I'm doing here is "testing".
You need to login to post a reply.