Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Using quotation marks

Reply
Thread Tools

Using quotation marks

 
 
Radith
Guest
Posts: n/a
 
      01-07-2005
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


 
Reply With Quote
 
 
 
 
Skip
Guest
Posts: n/a
 
      01-07-2005
"Radith" <(E-Mail Removed)> wrote in message
news:9nkDd.5536$(E-Mail Removed)...
> 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.


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Searching for a Firefox extension involving quotation marks Teh Suck Firefox 0 01-17-2006 09:00 AM
Quotation marks when mixing jsp and html forms deepstar@gmail.com Java 0 11-15-2005 06:26 PM
String and quotation marks M. Clift Python 2 10-22-2004 09:01 PM
Question about concatenating quotation marks Peng Yu C Programming 3 10-02-2004 08:08 PM
<q> and language-specific quotation marks Tristan Miller HTML 54 11-06-2003 05:19 PM



Advertisments