Question: Help with insert code in below Java switch/case so the amount can't be 0, must be over 0 (shall I use another if statement?) Please

Help with insert code in below Java switch/case so the amount can't be 0, must be over 0 (shall I use another if statement?) Please answer back with the changes inserted in the below code, Thanks! case 3 -> { System.out.print("Enter customers ssn: "); ssn = sc.nextInt(); List customers = Bank.getCustomers(); for (Customer c : customers) { if (c.getSSN() == ssn) { System.out.print("Enter the amount: "); float amount = sc.nextFloat(); c.createAccount(1.2f, amount); System.out.println(" Account added for customer with: " + ssn); } } }

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!