I've been trying to figure out why my code no longer goes into my if-statement after the user decides whether or not they want to withdraw or deposit from their account.
Here's my current output:
Would you like to withdraw or deposit money?
132.0
The date the account was created: Sun Sep 06 22:28:46 EDT 2015
When it gets to the "would you like to withdraw or deposit money?" it no longer allows the user to input any text. So my question is, what can I do to correct this?
Here is snippet of my current code:
public class T6 {
public static void main(String[] args) {
System.out.println("Enter the annual interest rate: ");
interestRate = scan.nextDouble();
System.out.println("Would you like to withdraw or deposit money? ");
String input = scan.nextLine();
if (input.equals("withdraw")) {
System.out.println("Enter the amount you would like to withdraw: ");
} else if (...) {
...
}
} // End of main method.
} // End of class header.