I have googled and read many answers on try,catch and throws. I still cannot get my question answered.
My question is, we try a code and if exception occurs, the execution terminates right away and catch takes care of the rest. In fact we define the scope of exception by declaring a class (along instance) in the parenthesis catch(IOException e)
This further acts as per our code within the block..say, print the error
{
e.printStackTrace();
}
Whereas, in case of throws, we do the same what we do in catch, personally declare the classes within parenthesis after throws which we expect to be the source of exception we expect.
.
.
}
catch(Exception e)
{
e.printStackTrace
}
And if it occurs, execution terminates, gets back to the caller and ultimately executes try catch itself.
So I really can't understand as to what makes throws so special. (Kindly do not confuse with complex answers. You can assume I am a beginner and I am sure, a preacher knows how to make ANYone understand the concepts).