Task: create a custom exception InsufficientBalanceException and throw it when withdraw > balance.
An integer balance
An integer withdraw
If withdraw > balance → throw InsufficientBalanceException
Else → print remaining balance
• balance ≥ 0
• withdraw ≥ 0
• Must create custom exception class
If withdrawal amount is greater than balance,
we throw a custom exception instead of allowing negative balance.
1.Create a custom exception class extending Exception.
2.In withdraw method:
• If withdraw > balance, throw new InsufficientBalanceException.
• Else subtract withdraw from balance and return remaining balance.