Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   Java (http://www.velocityreviews.com/forums/f30-java.html)
-   -   <Identifier> expected (http://www.velocityreviews.com/forums/t623525-identifier-expected.html)

loveme4 07-02-2008 10:56 PM

<Identifier> expected
 
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 07-03-2008 12:46 AM

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


All times are GMT. The time now is 04:10 AM.

Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57