Java ";" expected error

Discussion in 'Software' started by slashgonewylde, Oct 19, 2009.

  1. slashgonewylde

    slashgonewylde Private E-2

    double price;

    The line above is the line it says the ";" is expected. I don't know why it is an error because I have all the semicolons on the other lines also.

    Please Help
    Matt
     
  2. MutD

    MutD Specialist

    Please post all of your code, the Java compiler can point to the wrong line at times.
     
  3. JJJIrish05

    JJJIrish05 Sergeant

    check the line about "double price;" and make sure there is a ; there. If that isn't the case then post all (or at least a good chunk surrounding the problem) as java compilers don't always make sense when they point to an error
     
  4. slashgonewylde

    slashgonewylde Private E-2

    I fixed it. I re-wrote the whole code exactly the same under a different file name and it worked, so i don't really know why it didn't work the first time but now it is.
     
  5. JJJIrish05

    JJJIrish05 Sergeant

    Welcome to Java :)
     

MajorGeeks.Com Menu

Downloads All In One Tweaks \ Android \ Anti-Malware \ Anti-Virus \ Appearance \ Backup \ Browsers \ CD\DVD\Blu-Ray \ Covert Ops \ Drive Utilities \ Drivers \ Graphics \ Internet Tools \ Multimedia \ Networking \ Office Tools \ PC Games \ System Tools \ Mac/Apple/Ipad Downloads

Other News: Top Downloads \ News (Tech) \ Off Base (Other Websites News) \ Way Off Base (Offbeat Stories and Pics)

Social: Facebook \ YouTube \ Twitter \ Tumblr \ Pintrest \ RSS Feeds