Error message and problem with code

Hi all,
I have a code that i need to print the total
ie: retail multiplied by the quantity entered
this is what I have written
but when compiling error message is (not a statement )
any tips appreciated
or is this part of the code completely wrong???
Remembering that I have 4 arrays in the code
paul
System.out.println((input_part +"\t"+ "\t" + qty[input_part-1]+"\t"+ "\t"retail[input_part-1]+"\t"+ "\t" + "\n");
or is this more appropriate??
total=(quantity*cost);
System.out.println("Total Retail is:" + total);
But with this i get error
Operator * cannot be applied to int, double[]
total=(quantity*cost);

System.out.println((input_part +"\t"+ "\t" + qty[input_part-1]+"\t"+
"\t"retail[input_part-1]+"\t"+ "\t" + "\n");Look at what comes before "retail" in your code sample, and after the "\t" that immediately preceeds it. Should there really be nothing between those two values?
But with this i get error
Operator * cannot be applied to int, double[]
total=(quantity*cost);It's telling you that you can't apply the operator * (multiplication) to an integer and an array.
Did you really think that you'd be able to multiply a number by an array?
Perhaps you meant to do something like
total = quantity * cost[lastElt];

Similar Messages

  • Loading 7.1.1 error message -  "detected problem with audio configuration"

    I have deleted Quicktime and reloaded iTunes and keep getting the same error message about the problem with the audio configuration. I have removed iTunes completely and re-installed it and still get the same message. I have used the Windows cleaner program to remove all elements of Quicktime and still no resolution. Please help!

    I have the exact same problem. Im running vista business on my vaio. itunes has been working on this computer for at least two months now flawlessly and just today this message showed up. If you find a solution email me and i will do the same if i find one.

  • "Flash9b.ocx failed to register" error message and problems caused

    I didn't want to update my flash player but finally was "bullied' into doing so, because i kept receiving a screen message telling me to update it, without being given the option to say "No. Thank you anyway."  After I updated my flash player to 11....something (I didn't memorize all the numbers), even though the installation completed, I now have this ERROR MESSAGE whenever I try to access the internet on my computer:
    Solution Center
    Module
    C:\WINDOWS\system32\Macromed\Flash\Flash9b.ocx failed to register.
    I don't think I really needed my Flash player updated at all in the first place.  I don't use computer games and don't have an "x-box", I don't have a camera on, or with my computer.  I just didn't want to keep seeing that irritating demand to "Update".
    Is there a way for me to remove the update and re-install the flash player I already had?
    In the past, when I used my HP Officejet installation software from the original cd, to reinstall my printer-Solution Center software, it solved the problem I had when updating other Adobe software.  Unfortunately, the software from this cd, did not solve the problem this time.

    Download the uninstaller for Flash Player
    The Flash Player uninstaller executes on both 64-bit and 32-bit version of the Windows operating systems.
    uninstaller (797 KB)
    You can download older versions here:
    http://helpx.adobe.com/flash-player/kb/archived-flash-player-versions.html
    Note: It's not only the Flash player updater that will prompt you to update - Many pages that have Flash content will REQUIRE the latest version and WON'T WORK with anything older.

  • TS3354 when i first started using my moniter i never received any error messages about problems with HDCP issues. now all of a sudden i do. i am connected through hdmi. can anyone tell me if this has happened to them?

    When I first started using my monitar, I never got this error message telling me that i have HDCP issues. My HD content played without a problem. out of the blue now i can't play hd on my computer because it doesn't support HDCP. Can anyone tell me what to do?

    When I first started using my monitar, I never got this error message telling me that i have HDCP issues. My HD content played without a problem. out of the blue now i can't play hd on my computer because it doesn't support HDCP. Can anyone tell me what to do?

  • I have been trying to download free apps and keep getting error messages about problem with pmts, no matter what credit card I use. Why

    Why is this happening? It shouldn't  on free updates or apps.

    Kimmie65 wrote:
    Why is this happening? It shouldn't  on free updates or apps.
    Based on what you have said so far there is no way to answer your question. You must have a valid payment method on file with the iTunes store, even to download free apps. The payment method is used to verify who you are. The profile information in your iTunes account must match the information for the credit card you have entered.

  • Error Message and Itunes won't open. NEED HELP ASAP PLEASE

    I tried to get into my iTunes from my desktop short cut and the error message saying "Problem with Shortcut" then saying "This action is only valid for products that are currently installed." ***??? Anyway I tried to download a new version of iTunes then it said it could no remove old files. SO, I tried to remove iTunes by add/remove programs and it won't let me.>> NEED HELP I LEAVE TOMORROW FOR TRAINING AND I NEED SOME MUSIC AND UPDATE ON MY IPOD>>>>

    Welcome to AD!
    Download, install, and run this tool from Microsoft. Use it to fix the iTunes and QuickTime programs, as well as Apple Software Updater.
    http://support.microsoft.com/kb/290301
    Then reinstall iTunes.
    If you need step-by-step directions, they are in the *General installation troubleshooting* section of this Apple article. Click on each line to expand the instructions.
    http://support.apple.com/kb/HT1926
    The Microsoft installer cleanup tool is listed in the third step, "Clean up iTunes installer files on the computer".

  • I am trying to re-install Creative Suite 5.5 Design Standard on my Widows 7 Professional computer after I had to replace the hard drive. I keep getting error message and I get "Exit Code 15: Media DB Sync failed". I have run C Cleaner with same results. H

    I am trying to re-install Creative Suite 5.5 Design Standard on my Widows 7 Professional computer after I had to replace the hard drive. I keep getting error message and I get "Exit Code 15: Media DB Sync failed". I have run C Cleaner with same results. Have Disabled UAC and Startup items and Services with no success. Please help - frustrated to no end. Can someone help me?

    make sure you're using the adobe cleaner, not crap cleaner, Use the CC Cleaner Tool to solve installation problems | CC, CS3-CS6
    copy the installation files to a desktop folder and install from there.

  • HT1386 I am trying to sinc my iPhone with my iTunes to get my music on my phone and i keep getting an error message 42001 pop up when i attempt to sync what is this error message and what do i do to fix this problem??

    I am attempting to sync my phone with iTunes and I keep getting an error message 42001 so my phone can not sync with iTunes... What is this error message and what can I do to fix this problem and sync my phone to iTunes?

    Dear Apple team,
    I recently bought an iphone3GS from USA and jail broke it. Since I heard the there are lots of disadvantages I thought to unlock it officially through the original owner (in copy). He assisted me and confirmed that he unlocked it with AT& T (See the attachment). According to the instructions I restored the phone. But it is not activating with “Activation server is currently not available, please try again or try with iTunes”
    When I try with iTunes , it says “you haven’t inserted a SIM” even though I insert the original AT&T SIM.
    My current location is Sri Lanka ,so don’t have any apple support.
    Please help me to be a good fan of apple.

  • Lumia 800 - Marketplace Error message and code c00...

    Hello, I bought my Lumia 800 in NZ less than a week ago.  I get an error message when trying to access apps or get recommended updates via Marketplace...
    "We're sorry but we can't complete your request at the moment. Try launching Marketplace again.  If the problem continues, check back in a little while or try restarting your phone.
    Error code: c00cee3b"
    I have tried both the suggestions of checking back and restarting phone - this error message and code has been happening for several days.
    Any ideas or tips much appreciated.

    Hey akb_nz, Welcome to the Nokia Forums!
    I suggest that you try and reset your phone and re-sync your windows Live ID to it by performing a master reset, be sure to save a back up of your sensitive data!
    If you are still experiencing problems with marketplace and applications, you can find more information regarding windows phone troubleshooting here.
    I hope this has helped
    Sheldrick
    Press the 'Accept As Solution' icon if I have solved your problem, Kudos my post if my advice has helped you!

  • I just downloaded the trial of Photoshop.  Every time I try to open it, it comes up with an error message and closes less than 5 seconds into being opened.

    I just downloaded the trial of Photoshop.  Every time I try to open it, it comes up with an error message and closes less than 5 seconds into being opened.  Does anyone know how I can fix this?  I tried rebooting my computer and reinstalling photoshop.  Thank you!

    i7 is quite fast. that's what i am on too. You may need to
    It would be necessary that you have to use "Adobe Creative Suite Cleaner Tool". (see Use the CC Cleaner Tool to solve installation problems | CC, CS3-CS6 )
    The order varies depending on your individual needs:
    1. Maybe you have to activate/deactivate, so please have a look there:
    http://helpx.adobe.com/x-productkb/policy-pricing/activation-deactivation-products.html
    2. Sometimes, we know in the meantime, the "opm.db file" is the culprit. In this case you should delete it.
    3. Did you already try "uninstalling and re-installing"? Be careful with (de)installing aso. by (de)installing by your own resources. As much as I regret it and as strange as it may seem I fear it's a challenge for Adobe's Creative Cloud Cleaner Tool. Sometimes - for whatever reasons - CC doesn't "want" to work. In this case you should CC completely delete and reinstall by help of Adobe Creative Cloud Cleaner Tool. (A try to uninstall by own resources is not enough!)
    I quote: Adobe Creative Suite Cleaner Tool helps resolve installation problems for Adobe Creative Cloud and Adobe Creative Suite (CS3-CS6) applications. The tool removes installation records for prerelease installations of Creative Cloud or Creative Suite applications. It does not affect existing installations of previous versions of Creative Cloud or Creative Suite applications.
    Please use: http://helpx.adobe.com/creative-suite/kb/cs5-cleaner-tool-installation-problems.html   and follow the prescribed sequence of operations
    4. If necessary and for further questions click through http://helpx.adobe.com/contact.html or http://helpx.adobe.com/de/contact.html or
    Det finns också ett svenskt språkiga chatt. http://helpx.adobe.com/se/contact.html and if "open" please use chat, I had the best experiences. I quote from Adobe's employee Preran: The chat button is activated as soon as there is an agent available to help.

  • I updated to Mavericks and now I can'burn any DVD's any more. I get the following error message and the disk is ejected: The disc can't be burned because an unexpected error occurred (error code 0x80020000)

    I updated to Mavericks and now I can'burn any DVD's any more. I get the following error message and the disk is ejected: The disc can’t be burned because an unexpected error occurred (error code 0x80020000)
    I did burn the same way in MAC OS X 10.6.8. with no troubles!
    Can anyone please help me out?
    I use for years DVD-R of TDK 4.7GB 16X.

    Hey topo27,
    I would try out the following and see if it helps:
    Intel-based Macs: Resetting the System Management Controller (SMC)
    http://support.apple.com/kb/HT3964
    Welcome to Apple Support Communities!
    Cheers,
    Delgadoh

  • I have win7, outlook 2007 tried to sync with icloud but i get an error message and the calendar is blank.  Thanks apple? Any suggestions from the community?

    I have win7, outlook 2007 tried to sync with icloud but I get an error message and my calendar is blank.  I do not see my outlook calendar, on the left pane under all calandar I see my me account checked and all others are unchecked. I looked at icloud and all the data is in and the iphones syncl with ipad but something is not right with my PC Outlook.   I cannot get back to the good old mobileme. Thanks APPLE? Any suggestions from the community?

    This issue can be caused by corrupted cookies.
    Clear the cache and the cookies from sites that cause problems.
    * "Clear the Cache": Tools > Options > Advanced > Network > Offline Storage (Cache): "Clear Now"
    * "Remove the Cookies" from sites causing problems: Tools > Options > Privacy > Cookies: "Show Cookies"
    * http://kb.mozillazine.org/The_page_is_not_redirecting_properly

  • So I download photoshop cc (2014) and when I go to open the program, it gives me an error message and shuts the program down. It says," A problem cause the program to stop working correctly. Windows will close the program." Can someone help me please?

    So I download photoshop cc (2014) and when I go to open the program, it gives me an error message and shuts the program down. It says," A problem cause the program to stop working correctly. Windows will close the program." Can someone help me please?

    I've got the same issue and it affects all my adobe software.  You are not alone as I have seen several postings looking for the answer to this help request.

  • TS1814 I had to restore my Ipod Touch and now I can't connect to anything on it. When it asks for my Apple ID it comes up with an error message and says that it can't connect to the server. I have checked my WiFi connection and its connected.

    I have had to restore my Ipod Touch and now I can't connect to anything on it. When it asks for my Apple ID it comes up with an error message and says that it can't connect to the server. I have checked my WiFi connection and its connected.

    Hi there,
    I would recommend taking a look at the troubleshooting steps found in the article below.
    Can't connect to the iTunes Store
    http://support.apple.com/kb/ts1368
    -Griff W.

  • I tried down loading mozilla firefox to use as a web browser. It was downloaded 100% then when prompted to "run" the error message comes up with a red cross and the message'This file is corrupted" and won't let me proceed. What do I do now?

    I tried down loading mozilla firefox to use as a web browser. It was downloaded 100% then when prompted to "run" An error message comes up with a red cross and the message'This file is corrupted" and won't let me proceed. What do I do now?

    It is possible that your anti-virus software is corrupting the downloaded files or otherwise interfering with downloading files by Firefox.<br />
    You can try to disable the real-time (live) scanning of files in your anti-virus software temporarily to see if that makes downloading work.
    See http://kb.mozillazine.org/Unable_to_save_or_download_files

Maybe you are looking for

  • Stuck remote icons, no local icon drag, easy fix

    Folks: 10.7.1 on Quad-Core iMac I connected to a Win box on my LAN, opened an HD and a subfolder, then copied two files from my Mac there. Then closed the subfolder. Problem:  Those two items remained on the (2nd display) window, untouchable.  Switch

  • Restore System Record in WKM

    Accidentally, i've deleted system record _unknown user (ID 99) from WKM on Server... Are there any way to recover it/put back? Will it recover automatically with software update?

  • Kodak 8500 in the Snow

    Does anyone have a driver to make this fine printer work with Snow Leopard?

  • Storing Data from Serial Connection

    Hello All, I am fairly new to LabView, I am trying to store and anaylze values from a non-Labview hardware via an rs-232 connection. I have two devices on COM1 and COM2 ports. COM2 sends a value which I would like to store in an array. COM 2 points w

  • ACE backup-server and sticky

    Hi all, a question:      if a configure a serverfarm with backup-server serverfarm host S_Das   rserver DAS1     backup-rserver DAS1_1     inservice   rserver DAS_1     inservice standby   rserver DAS2     backup-rserver DAS2_1     inservice   rserve