<Identifier> expected

Joined
Jul 2, 2008
Messages
2
Reaction score
0
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
 
Joined
Jul 2, 2008
Messages
2
Reaction score
0
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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,767
Messages
2,569,572
Members
45,045
Latest member
DRCM

Latest Threads

Top