Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

Java Arithmatic problem

  • 28-04-2009 11:40PM
    #1
    Registered Users, Registered Users 2 Posts: 1,631 ✭✭✭


    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, Registered Users 2 Posts: 1,922 ✭✭✭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