Issues with Double, calc not accepted

I found a site with some example problems I'm working through. I'm following what I think I understand is right, but I get errors that the calculation with type Double isn't accepted. What am I missing?
import java.io.*;
class Change
  public static void main (String [] args) throws IOException
    String charData;
    Double change;
    Double value;
    //read in change amount
    BufferedReader stdin = new BufferedReader
      (new InputStreamReader (System.in));
    System.out.println ("Enter amount in cents");
    charData = stdin.readLine();
    change = Double.parseDouble (charData);
    //calculate change due
    //dollars
    value = change / 100;
    System.out.println ("There are " + value + " dollars");
    change = change % 100;
    //quarters
    value = change / 25;
    System.out.println ("There are " + value + " quarters");
    change = change % 25;
    //dimes
    value = change / 10;
    System.out.println ("There are " + value + " dimes");
    change = change % 10;
    //nickles
    value = change / 5;
    System.out.println ("There are " + value + " nickles");
    change = change % 5;
    //pennies
    System.out.println ("There are " + change + " pennies");
    //end
    System.out.println ("End");
}and my errors...
C:\JP>javac Change.java
Change.java:19: incompatible types
found : double
required: java.lang.Double
change = Double.parseDouble (charData);
^
Change.java:24: operator / cannot be applied to java.lang.Double,double
value = change / 100.0;
^
Change.java:26: operator % cannot be applied to java.lang.Double,double
change = change % 100.0;
^
Change.java:29: operator / cannot be applied to java.lang.Double,double
value = change / 25.0;
^
Change.java:31: operator % cannot be applied to java.lang.Double,double
change = change % 25.0;
^
Change.java:34: operator / cannot be applied to java.lang.Double,int
value = change / 10;
^
Change.java:36: operator % cannot be applied to java.lang.Double,int
change = change % 10;
^
Change.java:39: operator / cannot be applied to java.lang.Double,int
value = change / 5;
^
Change.java:41: operator % cannot be applied to java.lang.Double,int
change = change % 5;
^
9 errors
Thanks in advance for any help.

I just realized I included errors that included trying to force the 100 and 25 to Double by making them 100.0 etc. It basically yielded the same results though. sigh

Similar Messages

  • Issues with photos/videos not uploading in chronological order..

    I have been having issues with Adobe Bridge not uploading my photo/video files (from a CF card) in chronological order. When uploading I select to rename the files by shot date + 01.. etc. For photos the first image then becomes the last image after uploading, and for video files everything is out of order. Not sure why as the only other thing I have selected to add is copyright info. Also having issues with Bridge not converting raw files to DNG (which has led me to use Adobe DNG Converter - not terrible, but hopefully there is a reason?). I think it is a problem with Bridge, as photos uploaded to my website - something completely non-Adobe related are also then thrown out of order.. so it seems to be an issue with files that have come through Bridge at some point. Any advice is much appreciated.

    I just noticed that iTunes is now accepting 'some' videos. They are all the same file type (mp4), but iTunes is just randomly choosing which videos it wants add to the Library & not.
    I'm still not getting any results when it comes to the Photos.
    ... and one last thing ... only random songs are displaying the album art on the iPod. Yhey ALL appear in iTunes. If i restore my iPod & re-load everything, some of the songs that DID have artwork appearing on the screen now don't.
    This is really messed up! Wonder if the eventual Vista-compatible iTunes will fix this problem ...

  • Exchange 2010 - Issues with Room Finder not showing available rooms.

    Hi,
    We are having issues with room finder not populating the room resources that are available inside a meeting request within outlook 2010. It also appears that there is a drop down box that is present in a lot of the other forums and pages that I have referenced
    for troubleshooting:
    Single Exchange 2010 server version 14.03.0224.002 running all roles. Migrated from previous Exchange 2003 environment and old 2003 server has been decommissioned.
    Room mailbox created and all configured resource policies are working correctly for creating meeting requests. A distribution group was created and the room mailboxes added to this DG as per instructions here: hxxp://exchangeserverpro.com/find-meeting-rooms/
    . We have recreated the OAB and confirmed that the Room mailboxes are part of this list.
    Does anyone have any ideas why the rooms are not showing up in the Room Finder box?
    If I have missed any information please feel free to ask for more info.
    Thanks, all help will be appreciated.

    Hi,
    According to your description, I understand that room finder cannot show available room in Outlook 2010.
    If I misunderstand you concern, please do not hesitate to let me know.
    I want to double confirm whether it works before, or it can’t work after decommission Exchange 2003? How about other Outlook version?
    The offline address book (OAB) is generated by Microsoft Exchange Server. In order for the Room Finder feature to work, the OAB must be generated by Exchange 2010 or a later version.
    Please run Get-OfflineAddressBook | FL Identity,Server to double check OAB generation server. Also, run Get-OabVirtualDirectory | FL to check URL for current OAB VD and force update OAB.
    Then open Test E-mail AutoConfiguration to double check whether Outlook get correct URL.
    After above complete, please try to switch to Send/Receive tab, click Send/Receive Groups, and then click Download Address Book.
    Thanks
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact [email protected]
    Allen Wang
    TechNet Community Support

  • Sync issues with playlists. Not syncing playlists, and now my playlist have disappeared from iTunes. I am Using iTunes 11.1.3 and iOS 7.0.4

    Sync issues with playlists. Not syncing playlists, and now my playlist have disappeared from iTunes. I am Using iTunes 11.1.3 and iOS 7.0.4

    Hello surig84,
    Thank you for providing the details of the issue you are experiencing when syncing your iPad.  I recommend reviewing the following article specifically the section titled "Authorize using the correct account name."
    iTunes repeatedly prompts to authorize computer to play iTunes Store purchases
    http://support.apple.com/kb/ts1389
    Thank you for using Apple Support Communities.
    Best,
    Sheila M.

  • I am having issues with Sidebar files not appearing from within InDesign CS5.5. They show up fine from other Adobe applications. Using OS10.6.8.

    I am having issues with Sidebar files not appearing from within InDesign CS5.5. They show up fine from other Adobe applications. Using OS10.6.8.

    I would first of all trash the preference file for InDesign, make sure the application is closed then find the prefs in
    /Users/USER NAME/Library/Preferences/Adobe InDesign and just throw the entire folder away, it will generate a new one after you launch InDesign again.
    Now launch InDesign and see if the problems are resolved.
    If not I would repair your permissions on your hard drive wih disk utility, and if that fails then di-install InDesign and re-install that single application.
    Let me know if any of these suggestions work for you
    I will be checking my email although you might have to wait for a response as I will be taking a microlight flight over the Victoria Falls tomorrow. Yay can hardly wait.

  • Has anyone had issues with their itunes not coming up?

    Has anyone had issues with their itunes not coming up?  I keep getting error message 13014.  I just bought a new classic ipod and am not sure if this is the problem.

    Hi
    Your new iPod has certain operating system requirements. Does your iMac meet those requirements?
    http://www.apple.com/ipodclassic/specs.html
    3rd Column on the right hand side, about a 3rd of the way down. To find out which version of iTunes you have, launch it and select "About iTunes" from the iTunes menu.
    HTH?
    Tony

  • Why is netbook with c60 processor not accepting the download of drivers online & cannot use bluetoot

    why is netbook with c60 processor not accepting the download of drivers online & cannot use bluetoot

    https://www.adobe.com/cfusion/mmform/index.cfm?name=wishform for bugs or feature requests
    Error: "Unable to sync files"

  • Is anyone else having an issue with the iPad not charging if you use it while it's plugged into a power source?  Now that I'm on iOS 7, I either charge or use... Not both.

    Is anyone else having an issue with the iPad not charging if you use it while it's plugged into a power source?  Now that I'm on iOS 7, I either charge or use... Not both.

    No problems here.
    Edit...
    My IOS-7 is on an iPod Touch.

  • We have been having some issues with Email notifications not going out and getting hung up in SOST.  Can anyone please tell me whether we can use Solution Manager to monitor outbound emails?

    We have been having some issues with Email Notifications not going out and getting hung up in SOST. Can anyone please tell me whether we can use SAP Solution Manager to monitor outbound email?

    What version of Solman are you using ?  Check in t-code Rz20 >ccms monitor template of satelliate system , there would be option to monitor your outbound mails .You can sutomise your monitorig metrics in solman 7.1  else in 7.01 you use auto reaction methods to monitor .
    Regards
    Jay

  • Anyone have an issue withe airplay button not being available?

    Anyone have an issue withe airplay button not being available?

    Since the last pair of updates, my game camera won't pan around in any adventure level, leaving many sub levels off screen.  This is happening in all community adventure levels as well as my own on my moon.  Also can't seem to decorate my adventure levels without experiencing major glitches, especially with changing the materials.  The updates fixed a lot of stuff, but it seems like they trashed some things too.

  • Issues with Blackberry Playbook not being recognised by Windows Explorer

    Hello, I'm new to the forums but am having the same problems as many others are, that being my Playbook not regonised by Windows Explorer. I have tried all of the solutions I have read like unistalling Desktop Manager, uninstalling then re-installing drives in Windows Device Manager. But one I recently stumbled across was uninstalling Blackberry Device Manager, how do I do this?
    Also the main problem appears to be that my Playbook will not sync anything with my computer. In Desktop Manager I can back-up my Playbook, but not sync anything. After re-installing a drive I now get the message of: 'Your Blackberry device is not compatible with this feature' whereas before I got the message of: 'You haven't configured any sync methods' but yet all of the sync options were greyed out. 
    How do I get Windows Explorer to recognise my Playbook as a drive and how can I sync in Desktop Manager? 
    Thanks in advance!
    Note: I'm using Windows 7 32-Bit

    Hello Tobster_,
    The following article should also help with detecting your BlackBerry® PlayBook™ tablet:
    Identifying and troubleshooting issues with the BlackBerry Desktop Software detecting a USB connected BlackBerry PlayBook - http://www.blackberry.com/btsc/KB27424
    We hope this helps.
    Thank you.
    -FB
    Come follow your BlackBerry Technical Team on Twitter! @BlackBerryHelp
    Be sure to click Kudos! for those who have helped you.
    Click "Accept as a Solution" for posts that have solved your issue(s)!

  • Cannot sync Keychain with MobileMe - password not accepted

    I have installed SL twice after talking with Apple Support. On my MacBook Pro, immediately after installing SL I received a message to input the master Keychain password for my MacBook Pro. I had never see this message before installing SL. I never had separate password for my keychain, so I input my master logon password. It was not accepted.
    I posted this problem in a different thread under Apple Support and received advice to delete certain preference setting, use Keychain first aid, restore to default, etc. I did all that. No luck.
    I called Apple Support and the representative walked me through similar steps before advising me to reinstalling SL.
    I reinstalled, no fix. All that I have done is set my MobleMe preferences to NOT sync the Keychain so I won't get the message anymore.
    I also have an iMac and have had NO problems with the SL installation.
    Any advice or suggestions on a more permanent fix would be extremely appreciated! Thanks!

    I'm having real issues as well with my keychains on one of my machines. Are you having similar problems to what I have listed in http://discussions.apple.com/thread.jspa?threadID=2130442
    Note that if your keychains are hosed, like mine appear to be, you will have trouble doing anything with MobileMe.

  • Issue with double click zoom on Essbase Excel Add-in

    Several of my users have been experiencing a problem recently when the do a double click zoom in or zoom out in Excel Add-in 7.1.3. It will start clocking (icon flashes as well as the cells while the clocking is occuring) and the only way to break out of it is to hit escape. Sometimes the clocking will only last a minute but, depending on the number of members that you can drill down into, can last several minutes at which point the users end up just escaping out. This doesn't happen with all templates or with all users. Zooming in and zooming out using the menu works fine. This only occurs with double click zooming (which to the users is much quicker and they prefer not using the menu).
    This is Excel Add-in 7.1.3 on Office 2007 which I realize is not certified compatible but we have not had this issue until the last few weeks.
    Anyone else having this issue? Ideas?

    sometimes you dont find any excel sheets open but there will be a process allocated to it and running ..you can see this in the task manager..
    so go to task manager and try deleting all the process related to excel.
    Now after deleting all the processes you find NO excel sheets open..
    Try viewing the required excel sheet now..
    hope it works now..

  • Why am I now having certificate issues with Firefox but not IE?

    I can no longer log into Gmail, Facebook, Amazon, etc... using Firefox. I get the following error "accounts.google.com uses an invalid security certificate. The certificate is not trusted because no issuer chain was provided. (Error code: sec_error_unknown_issuer)". It works with IE but not Firefox. This just started a few days ago - prior to that I was able to log into those https sites without issue.
    Any suggestions? Thank you.

    "browser.xul.error_pages.expert_bad_cert" was set on false so I set it to true and tried reloading.
    Got the page giving me the option to add exception and continue. Kept trying that and would not continue to the page even after accepting 10+ times.

  • Unable to install IDM 11.1.1.6.0..Issue with  ASInstance ..not empty....

    Hello IDM experts, please help me. I have Oracle Linux 5.7 64 bit installed on Oracle Virtual box 4.1.10.
    I have valid IP address and Domain name and I am able to ping both.
    I have successfully installed database 11GR2 (11.2.0.1.0) for 64 bit linux. All issues with OS packages have been resolved. Nothing is ignored. All parameter setting has been followed as per the installation guide by Oracle.
    Installed JDK 1.7_03 version linux 64 bit ( I selected this as per the certification matrix ).
    Installed WLS 10.3.6 for 64 bit linux
    Ran RCU 11.1.1.6.0 and created all required schemas.
    Downloaded IDM 11.1.1.6.0 for linux 64 bit.
    While installing and configuring,
    I have looked into all other postings related to this error and I did not find anything missing in my configuration.
    Really appreciate your great help in resolving this issue. It is show stopper for me now.
    While runInstaller executing ASInstance step, I get in the log : "Error creating ASInstance asinst_1 "
    Caused by: java.lang.SecurityException: Can not initialize cryptographic mechanism
    at javax.crypto.JceSecurity.<clinit>(JceSecurity.java:86)
    ... 31 more
    Caused by: java.lang.SecurityException: The jurisdiction policy files are not signed by a trusted signer!
    at javax.crypto.JarVerifier.verifyPolicySigned(JarVerifier.java:289)
    Error creating ASInstance asinst_1.Cause:
    An internal operation has failed: java.lang.ExceptionInInitializerError
    Action:
    If I retry, I get error saying "Oracle instance not empty ... ...."
    Greatly appreciate your valuable suggestions.
    Edited by: 923360 on Mar 26, 2012 7:16 AM
    Edited by: 923360 on Nov 11, 2012 6:19 AM

    Hi Please find the steps to resolve this issue here. I resolved this completely.
    http://obieelive.wordpress.com/2012/05/25/obiee-11g-installation-failed-at-configuration-step-13-of-14/
    Regards,
    Sandep

Maybe you are looking for

  • How do I paste a sequence with multiple tracks?

    Hi, everyone.  I have a sequence that has 2 video tracks and 2 monaural audio tracks.  I create a new sequence that has 3 video and 3 stereo audio tracks, and I make sure that "Video 1", "Video 2", "Audio 1" and "Audio 2" are highlighted, and drag an

  • How to filter Billing Document Date

    Hello SAP Consultant I'm using vbrk and vbrp to fetch the data according to selection screen. Also i'm using Billing Document no as vbrp-vbeln and Billing date vbrp-fkdate. But i'm not able to filter the data according to billing document date. I'm u

  • Reg. Update and CATT mode in BDC

    Hello friends, Whn we create new BDC recording in that recording parameters having update mode and CATT mode. so I want to know abt Update mode (Asynchronous, synchronous and local) and CATT mode in BDC. Thanks. Marmik

  • How to utilize 'Location' in Smart Folders

    I've been trying to make a smart folder that I can use in conjunction with Dropbox, to filter what photos I am yet to upload. I was thinking something along the lines of 'Location is Pictures' and 'Location is not Dropbox' or something similar. Thoug

  • Help in SPRO Tcode

    Hi all,        Can any body help regarding , how to Define the validation in the Tcode SPRO. You will get this using following seq. Financial Accounting --> Financial Account Global setting -> Document-> lineitem ---> define validation for posting. F