Using quotation marks

R

Radith

I need to display the following:

This is the value of "A.1." being accessed from main():

At the moment I have System.out.println("This is the value of A.1. being
accessed from main(): ");
What modifications do i need to make to get quotation marks around A.1.

Cheers
 
S

Skip

Radith said:
I need to display the following:

This is the value of "A.1." being accessed from main():

At the moment I have System.out.println("This is the value of A.1. being
accessed from main(): ");
What modifications do i need to make to get quotation marks around A.1.

You need to escape the quotation marks: \"
System.out.println("foo \"bar\" ...");
results in:
foo "bar" ...
being printed to stdout.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,045
Latest member
DRCM

Latest Threads

Top