| | |
Help on this Java error message. Part 1
![]() |
•
•
Join Date: Sep 2007
Posts: 15
Reputation:
Solved Threads: 0
I am getting this error message please help me solve it
this is the java source file which the error is referring to
Java Syntax (Toggle Plain Text)
F:\JAVA\Java Files\lab 9\MyCustomer.java:19: ';' expected account deposit(500.0); ^ F:\JAVA\Java Files\lab 9\MyCustomer.java:26: ';' expected cust2 addAccount(account); ^ F:\JAVA\Java Files\lab 9\MyCustomer.java:26: not a statement cust2 addAccount(account); ^ F:\JAVA\Java Files\lab 9\MyCustomer.java:26: ';' expected cust2 addAccount(account); ^ F:\JAVA\Java Files\lab 9\MyCustomer.java:27: ';' expected cust1 addAccount(account); // a joint account for jack/debie ^ F:\JAVA\Java Files\lab 9\MyCustomer.java:27: not a statement cust1 addAccount(account); // a joint account for jack/debie ^ F:\JAVA\Java Files\lab 9\MyCustomer.java:27: ';' expected cust1 addAccount(account); // a joint account for jack/debie
this is the java source file which the error is referring to
Java Syntax (Toggle Plain Text)
public class MyCustomer { public static void main (String[] args) { Customer cust1, cust2, cust3; Account account; cust1 = new Customer("Debbie gralla"); account = new CheckingAccount(5000.0, 200.0); //accountNo = 1 cust1.addAccount(account); cust1.addAccount(new Savingsaccount(5000.0,0.05)); //saving accountNo= 2 cust1.addAccount(new CheckingAccount(200.0,0)); //saving accountNo =3 acccount = cust1.getAccount(2); //retrieve Debie savings account if (account != null) { account deposit(500.0); } cust1.getAccount(1); withdraw(200.0); cust2 = new Customer("Jack leu"); account = new CheckingAccount(500.0,20000.0); //accountno =4 cust2 addAccount(account); cust1 addAccount(account); // a joint account for jack/debie cust1.getAccount(4); withdraw(20000.0); cust3 = new Customer("Jill bye"); account = new CheckingAccount(755.0,210000.0); //accountno =5 cust3.addAccount(account); cust3.addAccount(new Savingsaccount(51070.0,0.04)); //saving accountNo= 3 cust3.addAccount(new CheckingAccount(755.0,210000.0)); //saving accountNo =4 cust3.getAccount(5); deposit(1000.0); cust3.getAccount(5); withdraw(2450.0); } }
Last edited by java_starter; Oct 31st, 2007 at 12:27 pm.
![]() |
Similar Threads
- Abstract Error Message (Java)
- Error message when trying to install Java (Windows 95 / 98 / Me)
- Error message when running simple Java pgm (Java)
- error message (Viruses, Spyware and other Nasties)
- Error message OCRAware (Viruses, Spyware and other Nasties)
- javayk.dll RUNDLL Error message at startup (Viruses, Spyware and other Nasties)
- Error message on start up - bridge.dll file missing (Viruses, Spyware and other Nasties)
- RUNDLL Error Message at Boot (Viruses, Spyware and other Nasties)
- Error message when trying to load Windows XP from a CD! HELP! (Windows NT / 2000 / XP)
Other Threads in the Java Forum
- Previous Thread: Help to find prime numbers without using an array
- Next Thread: how to load image in java using applets?
| Thread Tools | Search this Thread |
911 addball addressbook android api append applet application apps array arrays automation binary bluetooth businessintelligence button card character class client code collision component crashcourse css csv database eclipse ee error fractal free game gis givemetehcodez graphics gui html ide image integer integration j2me japplet java javaarraylist javadoc javafx javaprojects jni jpanel julia jvm linux list loan machine map method methods migrate mobile netbeans newbie objects oriented output panel phone physics problem program programming project projects radio recursion replaydirector reporting researchinmotion scanner se server service set sms software sort sql string swing test textfield threads transfer tree trolltech ubuntu utility windows






