- 1

can u debug this program

/* this is my code I want total legderbalance and individual account balance */ class Account { String CustName; int AccNo; double AccBal; static double LegenderBal; Account(String arg1,int arg2,double arg3) { CustName=arg1; AccNo=arg2; AccBal=arg3; } void deposit(double Amt) { System.out.println("depositing "+Amt); AccBal=AccBal+Amt; LegenderBal=LegenderBal+Amt; } void withdrawl(double Amt) { System.out.println("withdrawing money "+Amt); AccBal=AccBal-Amt; LegenderBal=LegenderBal-Amt; } void CheckBalance() { System.out.println("The balance in the account is: " +AccBal); } static void LegendeBal() { System.out.println("The balance in the legnder is: " +LegenderBal); } } public class Main { public static void main(String[] args){ Account a1=new Account("Ramesh",8133,10000.00); a1.deposit(5000.00); a1.CheckBalance(); Account.LegendeBal(); Account a2=new Account("suresh",8300,25000.00) a2.withdrawl(10000.00); a2.CheckBalance(); Account.LegendeBal(); } }

30th Aug 2016, 5:19 PM
SHRIDHAR M PATIL
5 Respostas
0
make sure your not missing ; in some of your line of code.
30th Aug 2016, 5:26 PM
Aquarius
Aquarius - avatar
0
I have not missed any ; symbols
30th Aug 2016, 5:31 PM
SHRIDHAR M PATIL
0
brace above main is not required only above one
30th Aug 2016, 5:40 PM
Dinesh Kumar
Dinesh Kumar - avatar
0
Can you please specify the problem it shows when running the program ?
30th Aug 2016, 5:43 PM
Ousmane Diaw
0
I missed the one"; "symbol its working properly....thanks for ur valuable answers
30th Aug 2016, 6:07 PM
SHRIDHAR M PATIL