Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > <Identifier> expected

Reply
Thread Tools

<Identifier> expected

 
 
loveme4 loveme4 is offline
Junior Member
Join Date: Jul 2008
Posts: 2
 
      07-02-2008
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
 
Reply With Quote
 
 
 
 
loveme4 loveme4 is offline
Junior Member
Join Date: Jul 2008
Posts: 2
 
      07-03-2008
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
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Is this expected IBGP peer behaviour? p47 Cisco 6 01-08-2006 02:52 PM
- Boot image integrity check...Failed (CRC expected 0x00004e9d, not ron Cisco 1 11-10-2005 01:24 AM
ISE:ERROR:Xst:829: Constant Value expected for Generic 'U'? Phil Tomson VHDL 3 02-16-2005 08:54 AM
[News] Jobless Claims Rise More Than Expected TechGeekPro MCSE 0 04-15-2004 03:44 PM
Re: Better than I expected 73171 The Poster Formerly Known as Kline Sphere MCSD 2 01-05-2004 05:41 PM



Advertisments
 



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