How to overcome exception handling in Java ?