bank

                Never    
Java
       
	import java.util.Scanner;

	class Bank
	{
		private String accno;
		private String name;
		private long balance;

		Scanner sc=new Scanner(System.in);
		
		void openAccount()
		{ 
			for(int i=1;i>0;i++)
			{
			System.out.print("Enter Account No: ");
			accno=sc.next();
			int l=accno.length();
			if(l==10 && isNumeric(accno))
			{
			System.out.print("Enter Name: ");
			name=sc.next();
			System.out.print("Enter Balance: ");
			balance=sc.nextLong();
			break;
			}
			else
			{
				System.out.println("Enter Valid account number");
				continue;
			}
			}
		}
		public static boolean isNumeric(String strNum) {
		    try {
		        double d = Double.parseDouble(strNum);
		    } catch (NumberFormatException | NullPointerException nfe) {
		        return false;
		    }
		    return true;
		}
		


		void showAccount()
		{ 
			System.out.println("Account no:"+accno +"\n"+"Customer Name:"+name+"\n"+ "Account Balance:"+balance);
		}

		void deposit()
		{
			long amt;
			System.out.println("Enter Amount U Want to Deposit : ");
			amt=sc.nextLong();
			if(amt<5000) {
				System.out.println("Minimum deposit should be 5000rs");
			}
			else {
				balance=balance+amt;
				showAccount();
			}
			
		}

		void withdrawal()
		{
			long amt;
			System.out.println("Enter Amount U Want to withdraw : ");
		
			amt=sc.nextLong();
			if((balance>=amt) && (balance<=5000))
			{ 
				balance=balance-amt;
				showAccount();
			}
			else
			{
				System.out.println("Less Balance..Transaction Failed..");
			}
		}

		boolean search(String acn)
		{ 
			if(accno.equals(acn))
			{ 
				showAccount();
				return(true);
			}
			return(false);
		}
	}
	

Raw Text