Hello rajesh3006!
You can place the code that may throw the exception in a try...catch block. You should read the java tutorials for exception handling.
I don't know what you want to do, but...