Generally without try catch trow we can not handle
exceptions handling is not a good practice.
In that case we have to first find the probalbe case for
exception and using if else codition we have to implement
those condition and handling this.
If you want to handle exceptions you must use try & catch
block or try followed by the finally block.
If you don't want to handle them you can use throws clause.