Hi,
I'm relatively new to java. I understand the concept of try/catch blocks. However , looking at some code that I'm supporting I notice that the main block throws some exceptions as follows.
Main Statement:
public static void main(String[] args)
throws ClassNotFoundException, SQLException, Exception)
I'm wondering why this was coded like this ? ( the original programmer is no longer around ). I understand the logic of throwing an exception somewhere in your code where it wouldn't normally throw one but I don't get what having the main throw an exception does. What would handle the main's exception ? I should note that this is run from unix shell scripts.
Thanks In Advance
I'm relatively new to java. I understand the concept of try/catch blocks. However , looking at some code that I'm supporting I notice that the main block throws some exceptions as follows.
Main Statement:
public static void main(String[] args)
throws ClassNotFoundException, SQLException, Exception)
I'm wondering why this was coded like this ? ( the original programmer is no longer around ). I understand the logic of throwing an exception somewhere in your code where it wouldn't normally throw one but I don't get what having the main throw an exception does. What would handle the main's exception ? I should note that this is run from unix shell scripts.
Thanks In Advance