Ah now I get it, so I say newBalance =0 and deposit =0 ?
Type: Posts; User: mwardjava92
Ah now I get it, so I say newBalance =0 and deposit =0 ?
System.out.println("Please enter the amount of your deposit");
deposit = keyboardIn.nextDouble();
System.out.println("Your new balance is" + newBalance);
newBalance = keyboardIn.nextDouble();
...
char response = 'Y';
while (response == 'Y')
System.out.println("Do you want to make another balance ( Y or N)?");
response = keyboardIn.next().charAt(0);
This is where I thought I'd...
Sorry guys I'm still confused, I thought I have the variable initialised already ?
Yeah I edited it so it's declared as 'Y' , but still not compiling.
These are the 2 errors that I'm getting now:
BankBalanceLoop.java:22: variable newBalance might not have been initialized...
// Practical 8 - Q7
// Marcus Ward
// 07/11/2011
/* Program to allow user to enter amount they wish to deposit.
Program will continue until user says 'No'. The current bank balance is €500.00 */...