For an example if you use something like this:
Thread.sleep(400)
The compiler throws an error: Main.java:10: error: unreported exception InterruptedException; must be caught or declared to be thrown
But if you handle it:
try {
Thread.sleep(400)
} cacth(InterruptedException error) {
// Code here
}
Then it won't. Why?