Illegal character \92 error.Tried everything

Hi, Im trying to make a calculator program and in the line where I divide a by b, im getting an Illegal Character:\92 error for some reason. To type \ im using \\ as an escape character, and it seems to work earlier in the program with no problem.
Heres the code:
import java.io.*;
public class PA83 //Simple calc
    public void calculator()
        try
            InputStreamReader isr = new InputStreamReader(System.in);
            BufferedReader br = new BufferedReader(isr);
            System.out.println("Enter number 1");
            double a = ((double) br.readLine());
            System.out.println("Enter number 2");
            double b = ((double) br.readLine());
            System.out.println("1.Add\n2.Subtract a-b\n3.Subtract b-a\n4.Multiply\n5.Divide a\\b\n6.Divide b\\a\n7.Quit");
            int c = Integer.parseInt(br.readLine());
            switch(c)
                case 1:System.out.println(a+"+"+b+" = "+(a+b));
                break;
                case 2:System.out.println(a+"-"+b+" = "+(a-b));
                break;
                case 3:System.out.println(b+"-"+a+" = "+(b-a));
                break;
                case 4:System.out.println(a+"x"+b+" = "+(a*b));
                break;
                case 5:System.out.println(a+"\\"+b+" = "+(a\b));
                break;
                case 6:System.out.println(b+"\\"+a+" = "+(b\a));
                break;
                case 7:break;
                case default:System.out.println("Invalid Option. Please select a number from 1-6");
                break;
        catch(Exception e)
            System.out.println("Error: "+e.getMessage());
}              It highlights case 5 and gives me an illegal character:\92 error, but ive used the double slashes(\\) earlier in the println to choose an option without any problem there.
I dont understand why this is happening! Even if i remove the "\\" i get the same error , and as BlueJ suggested, i tried typing the line again to avoid some invisible character causing problems..

Hi,
I think we use "/" for division and not "\" .
thanks & regards,
Manoj

Similar Messages

  • Unknown sync error -- Tried everything (?)

    I've recently switched from Chrome to Firefox to try and get as far away from Google as possible. There, I never had any issues with syncing across devices and platforms.
    On my Windows desktop, syncing never fails. On my MacBook Air, it always says, along the bottom of the window, that an unknown error has occurred.
    I did have the Keychain Services Integration add-on installed, but removed it because I thought that that might be why. Still, I get an unknown error. I removed *every* Firefox-related file on my MBA and got everything going again (minus that add-on), and it still throws an error. I also tried deleting the profile and creating a new one, resulting in the same error. Lastly, I tried the PlacesCleaner add-on, also with the same results.
    I'd attach a sync log, but it seems like some of what's in it might be private.
    Any ideas?

    You could '''Unlink''' that MBA from Sync, then restart Firefox on the MBA and then re-connect to your Sync account, to see if that helps.
    There's no private information in Sync error logs, but most of those logs contain more characters that these "Post a Reply" boxes can handle and the formatting might not carry thru when posted.
    In the second column of the Error log look thru the '''Sync.Status''' items for the first listed ERROR; subsequent ERROR listings might be of interest. Also, any '''Sync.ErrorHandler''' lines might have information we can use.

  • Ituens doesn't open. qtcf.dll error. tried everything

    I updated my itunes and now I'm getting that all too popular wtcf.dll error.
    first I tried to repair quicktime. nothing worked
    I tried to reinstall itunes.
    I uninstalled ituens and instaled it again
    I uninstalled quicktime and installed that again
    I downloaded a qtcf.dll file from thei nternet and put on my desktop, in the Windows foldar, and also in the system32 folder.
    nothing has worked so far. I also get a startup error too related to ituneshelper.exe

    I downloaded a qtcf.dll file from thei nternet and put on my desktop, in the Windows foldar, and also in the system32 folder.
    Let's first remove those three files, tidus. Having a QTCF.dll lurking about in unorthodox places on the PC can actually cause errors.
    I also get a startup error too related to ituneshelper.exe
    That suggests you're getting a rare version of the QTCF.dll error caused by a damaged Apple Application Support. (If AAS is broken, sometimes iTuneshelper isn't able to launch either.)
    Let's try the procedure I suggest to fizzylove in the following thread:
    http://discussions.apple.com/message.jspa?messageID=10918603#10918603
    Does that help with the QTCF.dll?

  • Illegal character error on good filename

    I created a new RoboHelp project and tried to insert a graphic named Timeline.jpg. I got the following error:
    Unable to rename file, "Timeline.jpg".
    The filename contains illegal characters.
    I tried inserting a graphic that I had used in a previous RoboHelp project and got the same error. Then I opened a previous RoboHelp project and was able to successfully insert the Timeline.jpg graphic into that project.
    I'm on Windows XP and RoboHelp 8. I would really like to avoid having to re-install RoboHelp, but I'm not sure where to look to troubleshoot this error message. Any help on this matter would be greatly appreciated.
    Thanks.

    Sorry that I wasn't more specific in reporting my solution.
    I cannot say that the deletion RB7 helped because I had done that before making my other changes.  Another website that I had visited suggested that Robo sometimes has a problem when a previous version still exists, so I can't say that removing it solved the problem.
    Previously, all the project files were in a folder on my desktop, several layers deep.  BeforeI upgraded to v.208 I did not have a problem inserting images and I never got the "illegal character name" or "cannot rename" errors.  AfterI upgraded the problems began.  BTW, I had checked the file path back to the image locations to make sure there were no spaces, illegal file names, etc.  So I knew the errors were bogus.
    After the upgrade I also noticed that all of the images I had previously inserted remained viewable in Preview Topic, but ALL of the images disappeared when I looked at the project after compilation.  At that time I was able to insert new images by saving them to the Gallery folder of RB8.  Perhaps I may have been able to insert them from another, nearby folder...I don't know.
    AfterI deleted RB7 I figured, heck, why not make everything clean and simple and copy the whole project from the desktop folder to a new folder in the root of "C."  When I re-opened the project everything was okay - back to normal.
    If I can suggest anything from my experience it would be that clean, simple directory structures are what RB-8.208 likes most and if you get too far away from RB's project folders you may get similar errors.
    Hope this helps, and thanks again for your assistance!
    John

  • SAXParseException: character conversion error: Illegal character 0x9A...

    This is my problem:
    I use JDom to parse remote XML document with DTD linked to it. But I get that error. Request is:
    SAXBuilder builder = new SAXBuilder();
    Document doc = builder.build(new URL(url));
    This works fine when I use these XML and DTD docs locally, which means that I give xml file name as a parameter from console. Then everything goes well. But when I move my program to server and try to run it there, SAXParseException is thrown. Why???
    Error is:
    error on line 1 of document "http://server.net/doc.dtd" Character conversion error: Illegal ASCII character 0x9A (line number may be too low)
    What this means? And why this just happens when I run program in server? Help, please
    tia J_J

    Exactly that's the problem.
    String class :
    * This class is implemented to map an ordinary java.lang.String
    * into an xml compliant String
    public class String2Xml
         private final String invalidChars [] = {"�",
                                                           "�",
                                                           "�",
                                                           "�",
                                                           "�",
                                                           "�",
                                                           "�",
                                                           "�",
                                                           "�",
                                                           "�",
                                                           "`",
                                                           "�",
                                                           "<",
                                                           ">",
         private final String replaceChars [] = {"��",
                                                           "&#223;",
                                                           "&#228;",
                                                           "&#246;",
                                                           "&#252;",
                                                           "&#196;",
                                                           "&#214;",
                                                           "&#220;",
                                                           "&#167;",
                                                           "&#128;",
                                                           "&#96;",
                                                           "&#180;",
                                                           "<",
                                                           ">",
                                                           "&apos;"};
         * Constructor
         public String2Xml();
         * This operation is implemented to check if the given String
         * matches one of the invalidChars. If an invalid char is found
         * it'll be replaced.
         * @return String - the correct xml String
         public String checkString(String check)
              for (int i = 0; i < invalidChars.length; i++)
                   check = check.replaceAll(invalidChars, replaceChars[i]);
              System.out.println("Check : " + check);
              return check;

  • Unable to log into Facebook. Script errors stacking up. Tried everything...syntax errors, script errors stacking up in error logs

    Alittle over a month ago, started intermittently experiencing problems logging into Facebook. Sometimes it would work, other times nothing..just the dreaded 'circle of no progress'..I have tried everything from clear cache to clicking my heels together..I am now at my wits end. I cannot be the only one? I see everything from syntax errors to declaration dropped errors in the error console. When I get pissed enough, I am suddenly allowed to log in, but then I get stuck in facebook, if I stay in there too long, unable to navigate. Is this my machine telling me I need to be more productive oir is this browser truly as messed as it appears?
    ''[Profanity removed by moderator. Please read [[Forum and chat rules and guidelines]], thanks.]''

    Not flash/real player related. Thats been eliminated long time ago..I don't even use real player, and not receiving any flash crashes/hangs. I am not able to log into ONE site (Facebook) When I go into error console it is jammed full of errors:
    Timestamp: 8/12/2012 6:03:23 PM
    Warning: Error in parsing value for 'filter'. Declaration dropped.
    Source File: http://s.ytimg.com/yt/cssbin/www-embed-vflKqOFPz.css
    Line: 1
    (about 20 of those in there)
    Timestamp: 8/12/2012 6:03:23 PM
    Warning: Unknown property '-moz-box-shadow'. Declaration dropped.
    Source File: http://s.ytimg.com/yt/cssbin/www-embed-vflKqOFPz.css
    Line: 1
    Timestamp: 8/12/2012 6:03:23 PM
    Warning: Unknown property '-moz-border-radius'. Declaration dropped.
    Source File: http://s.ytimg.com/yt/cssbin/www-embed-vflKqOFPz.css
    Line: 1
    Timestamp: 8/12/2012 6:03:23 PM
    Warning: Error in parsing value for 'background-image'. Declaration dropped.
    Source File: http://s.ytimg.com/yt/cssbin/www-embed-vflKqOFPz.css
    Line: 1
    support.mozilla.org : server does not support RFC 5746, see CVE-2009-3555
    Timestamp: 8/12/2012 6:04:17 PM
    Error: The character encoding of the HTML document was not declared. The document will render with garbled text in some browser configurations if the document contains characters from outside the US-ASCII range. The character encoding of the page must to be declared in the document or in the transfer protocol.
    Source File: about:plugins
    Line: 0
    Timestamp: 8/12/2012 6:06:34 PM
    Error: TypeError: window.fsr$removeListener is not a function
    Source File: http://forums.adobe.com/themes/adobe_forums_global/adobe.assets/ubi/foresee/foresee-trigger.js
    Line: 194
    These are just a few cut and pasted off the console...there are about 60 ++ in there off ab out 6 log in attempts. Went back in and was able to log in..logged out..tried to go back and same thing, can't log on.

  • Error message withg sync, tried everything, nothing helped. Please help me.

    Gets error message "Attempting to copy to the disk "Ipod" failed. The disk could not be read from or written to". It will put on about 15-30 songs before displaying this message, and can fully sync but it takes forever because i have to press "ok" than "sync" every 15-30 songs. already tried to send it back for a warranty replacement but they said there is nothing wrong. i tried everything, restored, zeroed out ipod disk, reloaded itunes, and all over again about 10 times

    Ran into the same error message while attempting to synch an iTunes purchased movie to my son's 5th Gen Video iPod from my G5 Tower (OSX 10.4.11). Here's what worked:
    Restored his iPod to factory settings. Noticed that this included having the iPod enabled for disk use (this box was not checked previously -- when we were getting the error message). Reselected which playlists and videos to synch, applied the synch settings, then waited (with crossed fingers and a few prayers to boot!). It worked. No error messages.
    Note: the iPod synch cable is plugged directly into one of the USB2 ports on the back of the G5 tower -- not into one on the 3rd party PCI expansion cards I installed to add more USB2 & Firewire ports (not sure if this is relevant, but it seems so based on your discussion thread here). Hope this helps.

  • Trying to install Creative Cloud Desktop on windows 8.1, I've tried everything. Cloud Cleaner, removed all Adobe products from computer, ran in Administrator Deleted everything still get error code 1

    I've tried everything. Cloud Cleaner, removed all Adobe products from computer, ran in Administrator Deleted everything still get error code 1 noting in all the troubleshoots have helped.

    Error Code 1: "Failed to install" | Creative Cloud Desktop :
    https://helpx.adobe.com/creative-cloud/kb/failed-install-creative-cloud-desktop.html

  • Please help, I've tried everything! Gmail won't open, it just endlessly cycles and rarely even gives me an error message: all other sites work fine (Windows 8).

    All sites work fine except Gmail will not load. I prefer Firefox, but to be fair, Chrome and IE are doing the same thing when I try to use them. Occasionally Gmail will pop up, most of the time it just endlessly cycles and I don't even get an error message. I'm going to have to get rid of gmail if this goes on.
    It's maddening! I've tried everything I could find on mozilla support--restarted in safe mode, clear cache, cookies, etc. This is a brand new Windows 8 laptop. It started a few weeks after I got it. There is nothing else wrong with it, it had a fresh new OS installed before I got it. Please help! Thanks so much.

    '''Try Firefox Safe Mode''' to see if the problem goes away. Safe Mode is a troubleshooting mode, which disables most add-ons.
    ''(If you're not using it, switch to the Default theme.)''
    * You can open Firefox 4.0+ in Safe Mode by holding the '''Shift''' key when you open the Firefox desktop or Start menu shortcut.
    * Or open the Help menu and click on the '''Restart with Add-ons Disabled...''' menu item while Firefox is running.
    ''Once you get the pop-up, just select "'Start in Safe Mode"''
    '''''If the issue is not present in Firefox Safe Mode''''', your problem is probably caused by an extension, and you need to figure out which one. Please follow the [[Troubleshooting extensions and themes]] article for that.
    ''To exit the Firefox Safe Mode, just close Firefox and wait a few seconds before opening Firefox for normal use again.''
    Please report back soon.

  • I just tried to update my iphone 4 to the 5.01. My iphone  backed up and started update but now its stuck in recovery mode and will not restore. It gives me an error message of 1, but I have tried everything on troubleshoot list and still wont work!!!!

    I just tried to update my iphone 4 to the 5.01. It said that my phone backed up and started update. i went on a run and came back and my phone is now stuck in recovery mode. It keeps saying that there is an unknown error, 1. I have tried everything on the troubleshooting list and cannot figure out what is wrong! Please HELP!!!

    http://support.apple.com/kb/TS3694#error1

  • My iTunes account says error 13019 after it has recognized all of the music and I have tried everything that is on this website and everything i can find about how to fix it; I even created in under a new administrator. Any suggestions how to fix it?

    My iTunes account says "The iPod "Madison " cannot be synced. An unknown error has occured (13019)" after it has recognized all of the music and has went through every song and it said "Copying  (song)   to "Madison"....." and then after it has went through all of my songs (492) it says the error message. I have tried everything that is on the Apple iTunes website about it, I have created the music account under a new administrator, I've tried everything. What do i do?

    I found something that worked.  I had never come across "recovery mode," but found reference to it, how to do it. http://www.ichilton.co.uk/blog/iphone/getting-the-iphone-ipod-touch-into-recover y-mode-48.html
    Put the ipod touch in recovery mode and then restored it, setting it up as a new Ipod, rather than restoring from the backup.  Given how much trouble I'd had, I suspected that the backup might be corrupted anyway.
    That seems to have resolved everything completely.

  • Error 21, I have tried everything, nothing seems to work

    Today I tried to upgrade my iPhone's firmware to 5.0.1 but ERROR 21 came up so I tried everything to fix it but nothing seems to work at all. Plus my iPhone is on DFU mode so I can not use it either.
    Please help me.

    What security software is running on your computer? Try to change the sercurity software settings or remove it.
    Take a look at this Apple article -> iTunes: Specific update-and-restore error messages and advanced troubleshooting
    Error 20, 21, 34, 37: These errors typically occur when security software interferes with the restore and update process.  If you are using a PC, follow this article to resolve this issue.

  • I cant update ,y ipod touch 4 , i tried everything but it keep giving me error 3194, i cant update ,y ipod touch 4 , i tried everything but it keep giving me error 3194

    i cant update ,y ipod touch 4 , i tried everything but it keep giving me error 3194, i cant update ,y ipod touch 4 , i tried everything but it keep giving me error 3194

    Did you try the actions specified here:
    - iTunes: Specific update-and-restore error messages and advanced troubleshooting
    - 3194-How do I reset the hosts file back to the default?
    - http://support.apple.com/kb/ts1275
    Saying "i tried everything " provides us with no information as to what you arelady tried?

  • Error message 228, tried EVERYTHING mentioned.

    # Question
    Error message 228, tried everything mentioned, checked google in everypage related to the error message, fresh install, changing cache, you name it.... I can STILL not install ANY add-on and ive tried to download it via the .xml file and it wont let me save it... Turned off firewall, everything. Still no joy. Completely out of ideas. I have quite a moderate to advanced knowledged in computers so please suggest ANYTHING!
    I've downloaded stuff using firefox. eg. music, photo's ect... but it wont download ANYTHING firefox related....

    If you have more than one user account, these instructions must be carried out as an administrator.
    Launch the Console application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ Open LaunchPad. Click Utilities, then Console in the icon grid.
    Select
    /var/log ▹ install.log
    from the hierarchical list on the left. If you don't see that list, select
    View ▹ Show Log List
    from the menu bar. Then select the messages from the last installation or update attempt, starting from the time when you initiated it. If you're not sure when that was, start over and note the time. Copy them to the Clipboard (command-C). Paste into a reply to this message (command-V).
    If there are runs of repeated messages, post only one example of each. Don’t post many repetitions of the same message.
    When posting a log extract, be selective. Don't post more than is requested.
    Please do not indiscriminately dump thousands of lines from the log into this discussion.
    Important: Some private information, such as your name, may appear in the log. Edit it out by search-and-replace in a text editor before posting.

  • I keep getting an error message that says "The administrator has set policies to prevent this installation" when I try to install iTunes.  I have tried everything on the website.

    I keep getting an error message that says "The administrator has set policies to prevent this installation" when I try to install iTunes.  I have tried everything on the website.  When i try to remove the components of iTunes I get the same message.  How can I download iTunes?

    Let's try something relatively simple. Download and save a copy of the installer to your hard drive (don't run the install on line and don't start the install just yet):
    http://www.apple.com/itunes/download/
    Now right-click on the iTunesSetup.exe (or iTunes64Setup.exe) that you downloaded and select "Run as administrator".
    Does that go through any better for you?

Maybe you are looking for

  • What sort of cable do i need?

    Hi there, my current setup is mac mini connected to TV using the DVI / s-video adapter on the apple store, however i also switch to a VGA connection on a monitor which is currently beside my tv using the DVI / VGA adapter i got in the mini's box. I h

  • Photoshop CC 2014 keeps crashing

    I've downloaded and installed Photoshop CC 2014. It all looks OK but when I open an image, photoshop crashes. I get the message 'Adobe Photoshop CC has stopped working'. I'm running Windows 8, so not sure if it's a Photoshop issue or Windows issue. A

  • Applet error with changing variable data after several runs....

    Can anyone give some advice on the following: I have a java card program running on a gsm sim: The program makes use of member variables which contain data that is reused and rewritten all the time. The member variables are all declared as (for examp

  • Flash and Shockwave

    So I had an issue with Adobe Shockwave.  I looked up how to fix it, going into plug-ins, enabling stuff, disabling others.  Now, flash doesn't work.  I go to fix that, and it disables shockwave.  How do I get both to work?

  • New PC, will my IPod retain existing files?????

    I have heard that if I hook my Ipod to a new PC, I will loos existing files...Is this true???