Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Java Arithmatic problem

Options
  • 29-04-2009 12:40am
    #1
    Registered Users Posts: 1,511 ✭✭✭


    Just new to java myself but i have the helloworld program completed and am on to the arithmatic which i saw on youtube.the problem i have is that when i run the command on the command prompt all i get is this

    C:\Users\MyName\Desktop>javac Arithmatic.java
    Arithmatic.java:8: ';' expected
    ^

    1 error.

    does anyone know where i am going wrong with this.


Comments

  • Closed Accounts Posts: 6,151 ✭✭✭Thomas_S_Hunterson


    You forgot a semicolon (probably on line 7/8 of the program.) or otherwise you've got something else slightly messed up, care to post the code?


  • Closed Accounts Posts: 995 ✭✭✭Ass


    Pro Tip: Read the compiler errors.


  • Registered Users Posts: 1,916 ✭✭✭ronivek


    shockframe wrote: »
    Just new to java myself but i have the helloworld program completed and am on to the arithmatic which i saw on youtube.the problem i have is that when i run the command on the command prompt all i get is this

    C:\Users\MyName\Desktop>javac Arithmatic.java
    Arithmatic.java:8: ';' expected
    ^

    1 error.

    does anyone know where i am going wrong with this.

    It's a pretty self explanatory error; although you may not be used to interpreting them.

    It's telling you that in the source code file Arithmatic.java on line number 8 that the compiler expected to find a ';' character but none was found. Typically this means you have a statement which should be terminated with a ';' character but you've omitted it.

    The general format of these compiler errors is as follows;

    Arithmatic.java:8: ';' expected
    <Source Code File>:<Line Number>:<Error Description>


Advertisement