Results 1 to 3 of 3
  1. #1
    Moltisanti is offline Member
    Join Date
    Aug 2009
    Posts
    19
    Rep Power
    0

    Default stuck on same syntax error....

    Trying to do a little project for school...I have a clean program except for the same syntax error three times...

    The code is...

    // Amount of material costs
    System.out.print("Enter amount of material costs, for " +
    "example 100.00: ");
    double amountOfMaterialCosts = input.nextDouble();



    And I keep getting a red line / syntax error notification under "input" at the bottom...been banging my head against the wall. Any help is much appreciated.

  2. #2
    mrmatt1111's Avatar
    mrmatt1111 is offline Senior Member
    Join Date
    Aug 2009
    Location
    San Jose, CA, USA
    Posts
    320
    Rep Power
    5

    Default

    Where is "input" being created/defined? Are you trying to use something that doesn't exist yet?
    My Hobby Project: LegacyClone

  3. #3
    Moltisanti is offline Member
    Join Date
    Aug 2009
    Posts
    19
    Rep Power
    0

    Default

    That's what I was trying to figure out as well, haha.

    Well, I redid the code anyways and got the results I needed. Thanks for the input!

Similar Threads

  1. Syntax error on token "(", ; expected
    By baltimore in forum AWT / Swing
    Replies: 3
    Last Post: 10-28-2009, 12:19 AM
  2. Replies: 2
    Last Post: 08-31-2009, 02:50 PM
  3. Syntax-Check Your XML
    By gilbertsavier in forum XML
    Replies: 0
    Last Post: 07-17-2009, 07:37 AM
  4. how to solve syntax error
    By pro85 in forum Java Applets
    Replies: 5
    Last Post: 04-06-2009, 11:20 AM
  5. syntax error
    By gabriel in forum New To Java
    Replies: 3
    Last Post: 08-03-2007, 03:26 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •