1 public boolean accountBalance(double accountBalance){
2
3 String regex1 ="[1-9]+\\d+[.][0]";
4 String regex2 ="[0][.]\\d+";
5 String regex3="[1-9]+[.]\\d+";
6 String account=String.valueOf(accountBalance);
7 double newbalance=Double.parseDouble(account);
8 //System.out.println("account-----------"+account);
9 // System.out.println("newbalance-----------"+newbalance);
10
11 if(account.matches(regex1)||account.matches(regex2)||account.matches(regex3)){
12
13 return true;
14 }
15
16 return false;
17
18 }