<Identifier> expected

Discussion in 'Java' started by loveme4, Jul 2, 2008.

  1. loveme4

    loveme4

    Joined:
    Jul 2, 2008
    Messages:
    2
    Hello,

    I am trying to compile this program and I keep coming up with an identifier as an error message and ')' expected. Can someone help me with this one?

    Thank you in advance.


    // This program calculates tuition bills
    {
    public static void main(String args[])
    {
    int myCredits = 15;
    double yourCredits = 16.5;
    double rate = 75.84;
    tuitionBill(myCredits,rate);
    tuitionBill(yourCredits,rate);
    }
    public static void tuitionBill(c,r)
    {
    System.out.println("Total due " + (r*c));
    }
    public static void tuitionBill(c, r)
    {
    System.out.println("Total due " + (r*c));
    }
    }



    Errors

    Three4.java:12: <identifier> expected
    public static void tuitionBill(c,r)
    ^
    Three4.java:20: ')' expected
    }
    ^
    2 errors
    loveme4, Jul 2, 2008
    #1
    1. Advertising

  2. loveme4

    loveme4

    Joined:
    Jul 2, 2008
    Messages:
    2
    Still trying to work

    I went in and changed line 12 but still 1 error

    2 // This program calculates tuition bills
    3 {
    4 public static void main(String args[])
    5 {
    6 int myCredits = 15;
    7 double yourCredits = 16.5;
    8 double rate = 75.84;
    9 tuitionBill(myCredits,rate);
    10 tuitionBill(yourCredits,rate);
    11 }
    12 public static void insert_tuitionBill, (c,r that)
    13 {
    14 System.out.println("Total due " + (r*c));
    15 }
    16 public static void tuitionBill(c, r)
    17 {
    18 System.out.println("Total due " + (r*c));
    19 }
    20 }
    21




    Three4.java:12: '(' expected
    public static void insert_tuitionBill, (c,r that)
    ^
    1 error
    loveme4, Jul 3, 2008
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. barry

    expected identifier error

    barry, Dec 24, 2005, in forum: ASP .Net
    Replies:
    6
    Views:
    5,762
    barry
    Dec 25, 2005
  2. Kobu
    Replies:
    7
    Views:
    441
  3. aarthi28@gmail.com
    Replies:
    2
    Views:
    1,740
    chris_doran@postmaster.co.uk
    Feb 26, 2007
  4. babakandme@yahoo.com
    Replies:
    2
    Views:
    885
    Owen Jacobson
    Dec 11, 2007
  5. S_K
    Replies:
    0
    Views:
    645
Loading...

Share This Page