Can someone please help? "illegal start of an expression"

Hi, I'm new here and I've been lurking for some time. Just never really had the courage to post until today when I am desperate for help. Can someone please take a look and see why I keep getting the following error message?
MortgageCalcv4.java:60: illegal start of expression
          public static void calculateTotals(int mortgageLength, double interestRate)'
It's for an assignment in school, and I am having an impossible time figuring out why it won't compile! I'm sure it's something simple and I'm just missing it. Your help is very much appreciated. Here's the code:
import java.io.*;
import java.lang.*;
import java.math.*;
import java.util.*;
import java.text.*;
import java.text.DecimalFormat;
public class MortgageCalcv4
     public static void main (String[] args)
          // declaration
          double interestamt,payment;
          int amtofloan,term;
          int[] arrayTerm = {7,15,30};
          double[] arrayInterest = {.0535,.055,.0575};
          DecimalFormat money = new DecimalFormat("$ 0.00");
          // calculations
          interestamt=.0575;
          amtofloan=200000;
          term=30;
          //for statement
          for(int y=0; y<arrayTerm.length; y++)
          calculateTotals(arrayTerm[y], arrayInterest[y]);
          //calculates the payment for the array
          payment=(amtofloan * ((arrayInterest[y]/12)/(1-Math.pow((1+(arrayInterest[y]/12)),-(arrayTerm[y] * 12)))));
          public static void calculateTotals(int mortgageLength, double interestRate)
          //2nd set of declarations
          double amtofloan = 200000.00;
          double interestamt = interestRate;
          int length = mortgageLength;
          DecimalFormat money = new DecimalFormat("$ 0.00");
          //calculations
          double payment=(amtofloan * ((interestamt/12)/(1-Math.pow((1+(interestamt/12)),-(length * 12)))));
          //displaying variables
          System.out.println("\nMortgage Payment Calculator");
          System.out.println("\nLoan total: " + (money.format(amtofloan)));
          System.out.println("Interest Rate: " + interestamt*100 + "%");
          System.out.println("Length of loan (in years)  " + term);
          System.out.println("\t\t\t----------");
          System.out.println("Your monthly payment is: "+(money.format(payment))+"\n");
          System.out.println("Your payment schedule:\n");
          System.out.println("\tPayment # \tRemaining Balance \tInterest");
          System.out.println("\t------------- \t----------------- \t-------------\n");
          //loop declaration
          int X;
          //loop calculations
          int termspread = term*12;
          int rows = 1;
          //begin loop
          for (X=1; X<=termspread; X++)
               //calculations for rows
               double interestamtpd = (amtofloan * (interestamt/12));
               amtofloan = amtofloan - (payment - interestamtpd);
               //display loop variable
               System.out.println("\t" +X + "\t\t" + money.format(amtofloan) + "\t\t" + money.format(interestamtpd));
               //if statement
               if(rows == 24 && X<termspread)
                    rows = 1;
                    //try statement
                    try
                        Thread.currentThread().sleep(3000);
                    //catch exception
                    catch (InterruptedException e)
               //else statement
               else
                    ++rows;
}

You seem to be missing an end curly brace for a for loop:
    for (int y = 0; y < arrayTerm.length; y++)
      calculateTotals(arrayTerm[y], arrayInterest[y]);
      // calculates the payment for the array
      payment = (amtofloan * ((arrayInterest[y] / 12) / (1 - Math.pow(
          (1 + (arrayInterest[y] / 12)), -(arrayTerm[y] * 12)))));
    }  // **** this was missingbut also I have to ask what you do with the payment information once you get it? It seems a calculation where the answer is just thrown out after it's obtained.

Similar Messages

  • My mac book air keeps starting in safe boot mode. I cant enter my password as it is caps lock so i cant access my computer. Please can someone please help me start back in normal mode? Thank you

    MY Macbook air keeps starting in "safe boot" mode, no idea why. I cannot get into the system because this mode makes everything write in capital letters and my password is in lower case. I keep turning it off and on but nothing changes and i cannot access my computer. Please can someone help me? Thank you

    I'm not getting a clear picture at all of what problems you're seeing. If you are seeing online accounts have their passwords changed, those accounts are being hacked. Someone may already have access to some account and is using that access to reset passwords on other accounts. Change the password on EVERY online account you have. Be sure to use a strong password, and don't use the same password on more than one site.
    If you are seeing changes to your bookmarks and browser history, your Apple ID may be one of the accounts that has been hacked. After changing the password on your Apple ID, you need to lock it down with two-factor authentication:
    http://support.apple.com/kb/ht5570
    Beyond that, we will need additional details about what specific symptoms you're seeing in order to help further. One thing I can say, though, is that these problems are very unlikely to be due to any kind of malware. See my Mac Malware Guide to learn more on that topic.

  • HT201412 can someone please help me out of nowhere my iphone went fuzzy then completely turned off i have tried charging it and it still wont work and itunes wont pick it up and it wont start up nothing please help me

    can someone please help me as its not letting me turn it on. i have tried to start it up pressing both buttons connecting to itunes and its not working still., it wont even charge or show apple icon anymore,

    You may not get a response as you are shouting at everyone.
    All caps indicates shouting, is considered rude, and is difficult to read.
    Many will not read such posts.
    Try turning off you caps lock and asking again.

  • I have just started using WD external hard drives, I use it to save my movies and music on. On more than one occasion, when I connect to my MacBook it erases everything on had on there. Can someone please help with this problem?

    I have just started using WD external hard drives, I use it to save my movies and music on. On more than one occasion, when I connect it to my MacBook it erases everything I had save on the hard drive. Can someone please help me with this problem? I am super tired of having to put all of my movies and music on the hard drive just to have it erased again. The products I am using are WD 4TB My Book and 2 TB My Passport external hard drives. When it happens, there is always an icon that reads, EFI, along with the My Book icon. Thank you for your assisstance.

    dwgar1322 wrote:
    I have just started using WD external hard drives, I use it to save my movies and music on. On more than one occasion, when I connect it to my MacBook it erases everything I had save on the hard drive. Can someone please help me with this problem? I am super tired of having to put all of my movies and music on the hard drive just to have it erased again. The products I am using are WD 4TB My Book and 2 TB My Passport external hard drives. When it happens, there is always an icon that reads, EFI, along with the My Book icon. Thank you for your assisstance.
    Yes, you have WD software installed  REMOVE IT !! 
    WD has warned its customers about their huge mistake that their software doesnt work on Mavericks and causes data loss.
    (also dont use WD drives anymore)
    Read all about it here:
    https://discussions.apple.com/thread/5475136?start=255&tstart=0
    See their website on removing the destructive WD software here:
    http://community.wd.com/t5/External-Drives-for-Mac/External-Drives-for-Mac-Exper iencing-Data-Loss-with-Maverick-OS/td-p/613775
    Western Digital External Hard Drives Experiencing Data Loss On OS X Mavericks
    http://www.cultofmac.com/252826/western-digital-external-hard-drives-experiencin g-data-loss-on-os-x-mavericks/

  • I've tried to install flash player several different times ans each time i get a connection error message.It downloads fine and when i run the file to start install,it installs up to 5% and then i get the connection error message.Can someone please help m

    I've tried to download the flash player several different times and each time i get a connection error message.It downloads fine and when i run the file to start install, it installs up to 5% and then i get the connection error message. I've tried disabling my antivirus software, closing my browser for install and nothing.Can someone please help me? I'm using Firefox.

    Hi!
    I had the exact same issue, being on a mac. If you are on a mac and the connection error message occurs, then use this link http://fpdownload.macromedia.com/pub/flashplayer/latest/help/install_flash_player_osx.dmg
    It allows you to download it offline, which is what I used.
    Hope I was help!
    -Haroon

  • When attempting to start iTunes, I get the following: "The iTunes library file cannot be saved. An unknown error occurred (-50)." Can someone please help me get this fixed?

    When attempting to start iTunes, I get the following: "The iTunes library file cannot be saved. An unknown error occurred (-50)." Can someone please help me get this fixed?

    Same problem here since latest update.  As usual poor support from Apple with no answer or fix for this bug.

  • Hi can someone please help, my imac crashed, when i try to start it up, it just beeps loudly 3 times, then there is a pause before it beeps 3 more times, this just continues to happen, any sugestions? please help

    Hi can someone please help, my imac crashed, when i try to start it up, it just beeps loudly 3 times, then there is a pause before it beeps 3 more times, this just continues to happen, any sugestions? please help

    allanpar wrote:
    i am having to use my laptop to post this question, missing my imac so much, its just not the same using this slow windows laptop.
    Then maybe it's time to buy a new Windows notebook.
    The RAM has either gone bad or somehow become unseated. Also there is the chance that the RAM slots have failed.

  • My Wifi no longer works - can someone please help me? My

    so my internet hasn't worked properly in two weeks. I can get it to work for five seconds but then it cuts off and no longer works. The wifi is fine on all my devices except my iMac. Once it cuts off I can turn the wifi on and off and it usually starts working for another five seconds but that only works three times. In the network window it tells me it has no IP address but I have no problems on any other device? Can someone please help me and thanks in advance if you

    Wi-FI connection drops
    Wi-Fi Problems in OS X Yosemite
    Wi-Fi Problems in OS X Yosemite (2)
    Wi-Fi Problems in OS X Yosemite (3)
    Wireless Diagnostics
    Also try turning off Bluetooth.
    WIFI AND BLUETOOTH FINALLY SOLVED, NO REALLY - YOSEMITE 10.10
    Troubleshooting Wi-Fi issues in OS X
    Wireless Connection Problems - Fix
    Wireless Connection Problems - Fix (2)
    Wireless Connection Problems - Fix (3)
    Wireless Connection Problems - Fix (4)

  • My touchpad just randomely stopped working and i dont know why? can someone please help me.

    i was using a plug in mouse and now i cant use my touchpad even when the mouse is unplugged. i have a hp pavillion gseries. can someone please help me, i dont like carrying a mouse around with me everywhere i take my laptop.

    Well, if you updated to 8.2, then you are living in a different world than the rest of us. 8.1 was just released on Monday.
    Do you not have an iCloud or iTunes backup that you can restore to? Have you not been importing your photos to a photo library on your computer?
    Maybe you could start from the beginning and we can see if we can help. If you had to restore your device, and you have absolutely no backups, then, I'm afraid you are out of luck. However, if you have backups, or if you have been importing your photos on a regular basis, then probably most of your stuff can be recovered.
    GB

  • I messed up when trying to update lightroom cc.. can someone please help! i'm on a deadline.. oy!

    I tried to install nef files from my nikon d750 and it said I needed to install an update for lightroom. it told me to launch creative cloud to do so. when i tried to launch nothing was happening (I didn't realize it was launched in my nav up by the date ). i then went to the website and updated the latest version there. when i started lr it now asks me for a serial number. i have the cloud version and i'm not sure what to do now. i can't find anything in my email (just a verification of paid email) and nothing is in my account info. can someone please help! i'm on a deadline for monday and adobe is closed until then!! ugh..

    Ask for serial number http://helpx.adobe.com/creative-cloud/kb/ccm-prompt-serial-number.html

  • Adobe Photoshop plan not letting me cancel. Can someone please help me?

    I keep trying to cancel my monthly plan, but every time I keep pressing the contact us and chat button, no one replies. I would like to cancel my plan since I don't use it and I do not want to keep getting charged for it. Can someone please help me?

    This is an open forum, not Adobe support... You need Adobe support to cancel a subscription
    -start here https://forums.adobe.com/thread/1703848
    -or by telephone http://helpx.adobe.com/x-productkb/global/phone-support-orders.html
    --and two links which may provide more details, if the above links don't help you
    -http://helpx.adobe.com/x-productkb/policy-pricing/return-cancel-or-change-order.html
    -http://helpx.adobe.com/x-productkb/policy-pricing/cancel-membership-subscription.html

  • Iv just introduced midi into my studio im running logic9 and have brought Midiman Aniversary 4in 4 out to my set up midi is running well but i cannot seem to mute or solo midi regions an isolate them from the audio can someone please help me Murray.

    Iv just introduced midi into my studio im running logic9 and have brought Midiman Aniversary 4in 4 out to my set up midi is running well but i cannot seem to mute or solo midi regions an isolate them from the audio can someone please help me Murray.

    Hi Charlotte,
    You don't say what your version of Windows you have. Assuming XP, go to Start | Run, type DXDIAG and click OK. Click the Sound tab and run the tests to eliminate a hardware problem first of all. If you don't hear anything, check your cables first of all. Also make sure "Mute" isn't checkmarked in your sound setup. You'll find that in Windows Control Panel.
    Which browser do you use? If you have Firefox 4, sign up to the HTML5 trial @ http://www.youtube.com/html5
    HTML5 is the latest video standard and doesn't require Flash player. Google is in the process of converting all its files to work with the new format. It may solve you problem. If you don't have Firefox 4, you can get it from here: http://www.mozilla.com/en-US/firefox/fx/
    IE8 doesn't support HTML5.
    To clean out your temp files, go to Start | Run, type: CLEANMGR and click OK. Click OK again to start the utility. Tick all the boxes except "Compress old files" because the latter takes too long, and then click OK. You can run this utility any time you wish by the way.
    The above steps will hopefully fix your problem. If not, post here again please.

  • I recently downloaded iMovie on my iPhone 5 and it is telling me to connect to wifi or use itunes to download iMovie well I have done both and it is still not working can someone please help me?

    I recently downloaded iMovie on my iPhone 5 and it is telling me to connect to wifi or use itunes to download iMovie well I have done both and it is still not working can someone please help me?

    Hi troy157,
    I'm sorry you are having issues with the iMovie app you purchased for your iPhone5.
    The first thing I would suggest is to log out of your iTunes Account on your iPhone, turn the iPhone off and then on again, and see if app finishes downloading/updating.
    Settings > iTunes & App Stores > Tap on your Apple ID account > Tap Sign Out
    If the issues persists, the article below will give you a few more troubleshooting steps:
    iOS: Troubleshooting applications purchased from the App Store
    Try the following steps to resolve your issue, testing the app after each step.
    1. Update your device software
    Update your device to the latest version of iOS.
    2. Check for app updates
    Ensure that your apps are up to date:
    Open the App Store and tap Updates. If updates are available, tap Update All.
    When prompted, enter your iTunes Store account information. App Store will then download and install the application updates.
    Note: Some applications may require a Wi-Fi connection to update.3. Install another app from the App Store
    4. Restart the application
    If the issue affects only a single app, try closing just that app:
    Press the Home button to return to the Home screen.
    Double-tap the Home button to display recent apps.
    Tap and hold the affected app until the red minus appears.
    Tap the red minus to quit the app.
    Press the Home button, then restart the app.
    5. Restart your device
    Hold the Sleep/Wake button until "slide to power off" appears. Slide to power off your device. When it is off, press the Sleep/Wake button to turn it back on.6. Reinstall the affected application
    Remove the application from your device and reinstall it.
    Touch and hold any application icon on the Home Screen until the icons start to wiggle.
    Tap the "x" in the corner of the application you want to delete.
    Tap Delete to remove the application and all of its data from your device.
    Press the Home button.
    Go to the App Store.
    Search for the application and then download it again.
    Note: If it is a paid app, ensure you are using the iTunes account you purchased the app with originally. If it is not, you will be charged for the app again. For more information regarding downloading previously purchased items, see this article.
    I hope this information helps ....
    Have a great day!
    - Judy

  • I have an iPhone 4 that is stuck in a recovery loop. i try to restore it but it comes up with an error code (-1) towards the end of the restore. can someone please help me?

    i have an iPhone 4 that is stuck in a recovery loop. i try to restore it but it comes up with an error code (-1) towards the end of the restore. can someone please help me?

    i just baught it off someone.. so im unsure if it was jailbroken or not.. and i dont think its under warranty now.
    is there a software or something along those lines that would indicate what peice of hardware is faulty?
    i baught it in this recovery loop thinking it was going to be a cheap way of getting a new phone without having to do much.. but now im starting to think its a brick

  • CAN SOMEONE PLEASE HELP ME REOVE ITUNES!

    How Can I Remove and Unistall Itunes From My Computer I Went To "Add or Remove Programs" and Clicked Itunes "Change/Remove" and nothing happen! its still there same thing for quicktime and im trying to unistalled them because i dont have any were in my computer to click itunes to open! so its like i dont even have it but i cant download it till i remove that one on the add or remove program section but i cant because nothing happens CAN SOMEONE PLEASE HELP ME REOVE ITUNES! FROM THAT LIST!

    let's try swapping out your QuickTime.
    head into your Add/Remove programs. uninstall QuickTime.
    Next, we’ll manually remove any leftover program files and folders.
    1. On the Start menu, click My Computer (or double-click My Computer on the Desktop).
    2. In My Computer, open Local Disk.
    3. Open Program Files.
    4. Right-click on the QuickTime folder and click Delete from the shortcut menu.
    5. Navigate to C:\Windows\system32\.
    6. Remove the files QuickTime.qts and QuicktimeVR.qtx.
    7. Restart your computer.
    next, we'll get a fresh copy of QuickTime into your PC by doing a repair install of itunes.
    switch off antivirus and antispyware applications prior to the repair install.
    go into Add/Remove and select itunes. click "Change" and then click "Repair".
    if the repair install goes through okay, restart the PC and try launching itunes again. does it launch properly now?

  • CAN SOMEONE PLEASE HELP ME REMOVE ITUNES SO I CAN RE INSTALL IT!

    How Can I Remove and Unistall Itunes From My Computer I Went To "Add or Remove Programs" and Clicked Itunes "Change/Remove" and nothing happen! its still there same thing for quicktime and im trying to unistalled them because i dont have any were in my computer to click itunes to open! so its like i dont even have it but i cant download it till i remove that one on the add or remove program section but i cant because nothing happens CAN SOMEONE PLEASE HELP ME REMOVE ITUNES! FROM THAT LIST!

    Well, you can do what I did. You can click onto "Start" and then "My Computer". From there, click onto Hard Disc Drive "C". A window will open that shows the folders that are present. Click onto "Program Files" and then another window will open. You should see both I-Tunes and Quicktime there. Right click onto each one and then click "Delete". That should work. When it's done, restart your computer.
    If it doesn't work, hit the "control/alt/delete" keys at the same time and select "Processes". If they show up there, delete them from that list first and then repeat the above procedure.
    Good luck. By the way, check out my post on "People with Problems, Read here". You'll find that there's many of us here that cannot make our I-Pod's work correctly because the software for them is HORRIBLE!

Maybe you are looking for

  • Beginners guide - Library vs Time Machine vs Vault?

    I am new to Aperture 2, and up until now have had a workflow system that's involved importing images and exporting them into folders, and have no idea what Apertures Library is or does? I am using it as a default setting at present. I have never used

  • ADE requires new download for each new book.

    Why do I have to re-download ADE every time I try to open an .acsm file? It's a pain! The message I get says that there's a new version of ADE that I must download (hard to believe, since I download files frequently from my library's site.)  How can

  • How to access ISR scenaros / PDF Forms to Webdynpro Java

    How do we access the ISR Scenarios / PDF Forms created in R/3 to a WebDynPro - Java application. I don't think we have to use BAPIs to access these Adobe Forms. Any insights is really appreciated. Thank you very much .... Waiting for any replies

  • Is possible work with boleto from SmartForm using the Tcode FBZP  ?

    HI, SAPScript bar code output in PDF format As a SAP does not intend to deliver this solution for SAPscript  because The report - RSTXPDFT4 does not work correct to bar code in the boletos (Brazil) when convert to PDF, we are going to change to Smart

  • WORD - OLE - VERY URGENT

    Hello (sorry for my english) My question is : I use Ole with Forms 6 and Word 2000 But sometimes when I open a document, it happen that this document has already openend by another user and so Word make appear a popup window (Read Only, Notified or C