r/javahelp • u/Optimist_Design5444 • May 19 '24
Core Java Banking app
I have to make a banking app(on console) with feature like withdrawal and deposit and account info using core java concepts like loops,threads, exception handling,file I/O etc! Plss help me with what I have to do!
Code is in comments!
0
Upvotes
1
u/Optimist_Design5444 May 21 '24
package pack1;
import java.util.HashMap; import java.util.Map; import java.util.Scanner;
class BankAccount { private static Map<String, Double> accountBalances = new HashMap<>(); private static Map<String, String> accountPasswords = new HashMap<>(); private String accountNumber;
}
public class Main { public static void main(String[] args) { @SuppressWarnings("resource") Scanner scanner = new Scanner(System.in); System.out.print("Enter your name: "); String name = scanner.nextLine(); System.out.print("Enter your account number: "); String accountNumber = scanner.nextLine(); System.out.print("Enter your account password: "); String password = scanner.nextLine(); System.out.println("Welcome, " + name + "! Account number: " + accountNumber);
}