Datasets:

ArXiv:
License:
File size: 674 Bytes
c574d3a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
package isufficientbalanceexception;
import java.util.Scanner;
 class IsufficientBalanceException {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        BankAccount ba=new BankAccount();
        Scanner sobj=new Scanner(System.in);
        System.out.println("Enter amount to deposit:");
        double da=sobj.nextDouble();
        System.out.println("Enter amount to withdraw:");
        double wa=sobj.nextDouble();
        ba.deposit(da);
        try{
          ba.Withdraw(wa);
        }
        catch(MyException e)
        {
           System.out.println("Excepption caught!!"+e);
        }
    }
    
}