We help IT Professionals succeed at work.

Outputting a character

Squadless
Squadless asked
on
Medium Priority
199 Views
Last Modified: 2010-04-16
If i need to write to a file the following sentence in the exact format as below, how do i do it:

My name is "Alex"

I cant seem to get the " character to print out...how do i do it????

thanks
Comment
Watch Question

ozo
CERTIFIED EXPERT
Most Valuable Expert 2014
Top Expert 2015

Commented:
In what language are you trying to do this?
IT Manager
CERTIFIED EXPERT
Commented:
Squadless,

What language are you using?  Most use double quotes for a special purpose but also provide a way to escape them so they would be treated as a normal character.  The character you use depends on the language.  Some common ones are the backslash (\) or a double quote (").  To escape the double quote with either of these you would use \" or "".

Let me know if you have any questions or need more information.

b0lsc0tt

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts

Author

Commented:
erm i messed up...in java...sorry

Author

Commented:
got it...was too lazy to try things
b0lsc0ttIT Manager
CERTIFIED EXPERT

Commented:
I'm glad that I could help you.  Thank you for the grade, the points and the fun question.

bol
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.