What is the purpose of the try-catch block in Java?
The try-catch block is used to terminate the program gracefully when an exception occurs.
Actually, the purpose of try-catch is to handle exceptions without terminating the program abruptly, so the program can recover or perform alternative actions.
Can you explain how try-catch can help in making the program more fault-tolerant?