![]() |
|
|
|
Thread Tools | Display Modes |
|
|
|
|
#1 |
|
Newbie
Join Date: Mar 2008
Posts: 2
Rep Power: 0
![]() |
<identifier> expected error java
Hi guys, I have this code and when I try to compile and run it gives me an <identifier> expected error.
The code with the irrelevant parts taken out.
package ACCOUNT;
import java.util.Scanner;
import java.util.GregorianCalendar;
import javax.swing.*;
class Bank{
static private double bal; //Account balance
static int withdraw; //amount of times withdrawn
static void setBal(double amount){bal = amount;}
static double getBal(){return bal;}
public static void main(String[] args){
//code
}
class Charge extends Bank{
double fee = Bank.withdraw * 0.10;
double tempbal = Bank.getBal();
double amount = tempbal - fee ;
Bank.setBal(amount);
}when I run it points to the line Bank.setBal(amount) and says <identifier> expected can someone help? |
|
|
|
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| register_shutdown_function() not behaving as expected | grimpirate | PHP | 10 | Jan 18th, 2008 8:06 PM |
| Unqualified ID Expected? | SonicReducer | C++ | 3 | Mar 28th, 2007 5:29 PM |
| error 3 Expected end-of-statement | m0rb1d | Other Scripting Languages | 0 | Dec 12th, 2006 10:05 AM |
| error: expected primary-expression... | rup | C++ | 18 | Apr 17th, 2006 2:24 PM |
| Total noob, trouble expected? | Mudanie | Python | 18 | Oct 27th, 2005 10:03 AM |