Having trouble using escape sequences

I'm trying to display a Christmas tree, but I'm having trouble using \ before the symbols. It won't compile.
    result.append("      \/\\ " + NEW_LINE);
    result.append("     \/  \\ " + NEW_LINE);
    result.append("    \/    \\ " + NEW_LINE );
    result.append("   \/      \\ " + NEW_LINE);
    result.append("   \-------- " + NEW_LINE);What could be the problem?

Following your advice, it still won't compile. Sorry, my knowledge of Java is limited at this moment.
    result.append("      / /\ " + NEW_LINE);
    result.append("     /  /\ " + NEW_LINE);
    result.append("    /    /\ " + NEW_LINE );
    result.append("   /      /\ " + NEW_LINE);
    result.append("   -------- " + NEW_LINE);Error message:
C:\Users\John\Desktop\ChristmasTree.java:18: illegal escape character
result.append(" / /\ " + NEW_LINE);
^
C:\Users\John\Desktop\ChristmasTree.java:19: illegal escape character
result.append(" / /\ " + NEW_LINE);
^
C:\Users\John\Desktop\ChristmasTree.java:20: illegal escape character
result.append(" / /\ " + NEW_LINE );
^
C:\Users\Johnny\Desktop\ChristmasTree.java:21: illegal escape character
result.append(" / /\ " + NEW_LINE);
^
4 errors
Tool completed with exit code 1
Edited by: jvu on Sep 18, 2008 6:25 PM

Similar Messages

  • I'm having trouble using Adobe Reader

    I'm having trouble using or uninstalling Adobe Reader, i get a message when the programme has been anitiated which says Adobe Reader has encountered a problem and needs to close, i went on to Adobe's website and it said try uninstalling Adobe Reader and then re-install it as this sometimes works, i tried un-installing it from the Add or Remove programme but that didn't work either as i got another message telling me that the patch package could not be verified and to make sure i have permission.

    Dear Mylenium.
    Sorry i don't quite understand your reply, What do you need to know?

  • Im having trouble using Emoji on some apps since i downloaded ios5... Anyone else experiencing this?

    Im having trouble using Emoji on some apps since i downloaded ios5... Anyone else experiencing this? Ive tried every thing deleting emoji and apps and re-instaling to no sucsess?? Any help would be great thanks!

    YES! I am having a lot of AppStore problems since iOS 6. My 2 main issues are:
    1. AppStore crashes constantly or will just sit & spin then does nothing at all.
    2. If I search for a specific App, making sure my spelling is correct, AppStore will NOT bring the app up. Instead, it will bring up unrelated apps.
    Podcasts app does the same thing, as well as jumbling up dates. Very impossible to find the correct episode.
    APPLE, please tell me you are reading this and that a fix is quickly under way!!

  • Im having trouble using bbciplayer on my ipad it says i need to switch to wifi but im already connected can any one help?

    im having trouble using bbciplayer on my ipad it says i need to switch to wifi but im already connected can any one help? I ve uninstalled/ reinstalled  switched it on and off what next?

    Did you try downloading the movie from iTunes on your iPad?  I know it takes longer but I'd try that. 
    Also try to reset all settings. 
    Settings > General > Reset. Reset all settings. 

  • I just downloaded Mainstage, I'm having trouble using it, because it won't open, can someone help me out?

    I have the latest Mac Os update ... I downloaded Mainstage, it won't open... Why is that???  I've deleted it, reinstalled it, but I keep having trouble using it...

    Yu have to run the library upgrader - it is in your applications folder in the utilities folder - double click on it to exceute it - then launch iPhoto after running the library upgrader
    LN

  • I'm having trouble using my redemption code to access Lightroom?

    Can any one help I am having trouble using my redemption code to access the download of lightroom

    i am having the saame trouble with my audio book.  I can get music but no longer my book. and it makes me mad. help me too.

  • I'm having trouble using my track pad. The arrow moves but I can't click on anything.

    I'm having trouble using my track pad. The arrow moves but I can't click on anything.

    Oh thank you for posting on how to enter safe browsing! I had tried to disable add-ons, but couldn't make anything click to do so. So frustrating!
    Anyway, after putting on the safe browsing, it worked *immediately*, so clearly the add-ons were the issue! I deleted a bunch I don't use anyway, and it's been working fine for hours.
    Thank you!!

  • I'm having trouble using the iTunes and Apps store because i can't register my Nigerian mastercard. What should i do. i'm trying to register it in the Nigerian iTunes store.

    I'm having trouble using the iTunes and Apps store because i can't register my Nigerian mastercard. What should i do. i'm trying to register it in the Nigerian iTunes store.

    Is this a new Apple iD? If it is, and you have already set it up, then you have two options:
    1.     Temporarily put a Credit Card or Gift Card on the account to download the free app. If you put a credit card, then once you have downloaded the app, you should be able to go into your Account preferences and change the payment option to = None.
    2.     You can download the fee App, and then set up a new Apple ID.
    Cheers,
    GB

  • I'm having trouble using my iTunes to buy things in games is ther something I should it keep telling me to contact support

    I'm having trouble using my iTunes card to purchase things in games keeps telling me to contact support. I can buy song so it is activated can anyone help??

    i am having the saame trouble with my audio book.  I can get music but no longer my book. and it makes me mad. help me too.

  • I am having trouble using home sharing.

    I am having trouble using home sharing. My brother is able to access my libary but I can't access his. Even though we put in his ID for me to access, it just loads and gives up. Can anyone help me out? My OS is windows vista and my brother's is windows 7.

    Welcome to the Apple Community.
    The following article(s) may help you.
    Troubleshooting Wi-Fi networks and connections
    Recommended Wi-Fi settings
    Troubleshooting Security Software

  • Having trouble using adobe

    HAVING TROUBLE USING ADOBE AFTER ITS INSTALLED... YOUTUBE, FACEBOOK GAMES.... SAYS OOPS TRY AGAIN

    You're in the Reader forum. You want http://forums.adobe.com/community/flashplayer

  • I having trouble using time machine

    I having trouble using time machine on my mac. When I click it, it wants me to set it up. When I click on that it says  to select backup disk but there is nothing on the page, it's blank.  What do I do next?

    Have you connected the Hard Drive you want to storage your backup? If the answer of this question is yes, you need to format it in "Mac OS Extended (Journaled)" It can be a NTFS drive and you are probably using macfuse to have permission to read and write it time machine can't write on NTFS (As far as I know) Hope it helped

  • Hello. I am having trouble using Mobileme with microsoft oulook 2010. .The error Mobileme has stopped working . Can anybody help. ??Thanks

    Hello
    I am having trouble using Microsoft Outlook 2010. When starting Microsoft Outlook displays the error message Mobileme has stopped working. Can anybody help.
    Thanks

    Well yes, of course you are having trouble using MobileMe because MobileMe no longer exists and has not existed for the last 2 years at least.
    MobileMe has been replaced by iCloud, so you will never be able to use MobileMe because it does not exist.
    Also, I would suggest that you look more closely before you post, because you have posted this in an iPhone forum and this question has nothing to do with iPhones.  You would get more help if you posted in the correct forum.

  • I am having trouble using my I phone with Icloud. I tried diabling it & all my contacts have been cancelled.

    I am having trouble using my I phone with Icloud. I tried diabling it & all my contacts have been cancelled.

    OK, I called Plantronics and it was an easy fix.  You need to hold down the volume up button and the power button on (on the headset) at the same time until the lights on the headset start flashing red and blue.  Then turn on the phone Bluetooth and it pairs up just fine.
    Thanks fo rthe help!!

  • I am having trouble using my time capsule to back up. I tried repairing through "first aid" Disk 4s2 failed and I have been directed to erase. What is in this disk? Should I erase it??

    I am having trouble using my time capsule to back up. I tried repairing through "first aid" Disk 4s2 failed and I have been directed to erase. What is in this disk? Should I erase it??

    Only you know what is on the disk.. if you have been running TM to the TC then it will have your backups.. are they important?? Otherwise it will be what you..or others in the house have copied to it.. is that important?
    If the first aid has failed the disk then it could be a good idea to erase it.
    Does the disk mount in finder so you can see the main directory?

Maybe you are looking for