Try block and catch block (java)
Hi
I am a java developer.
Just i want to ask you is it necessary that each try block must be followed by a catch block.
Thanks in advance
Hi
I am a java developer.
Just i want to ask you is it necessary that each try block must be followed by a catch block.
Thanks in advance
Hey Archie!
The question you ask about Try Block and catch Block has really a simple and easy answer.
Here is your answer.
Well it is not necessary each catch block must come after each Try block. But there is a compulsion that each Try blocks must followed by a catch of Finally Block. And all other expectations which are about to be thrown, must be declared in the "throws clause of method. Anyways you can either arrange the Try Block first, or Catch box first, it does not make a difference and is not necessary at all.
Thanks
Tunacao Caaron.
Hi ,
You are a java developer. So i think you understand me without problem.
I inform you that java use five keywords ; try,catch,throw,throws,finally .
In this language you ought to follow the rule of exception handling in java.
This is the most reliable way in my thinking .
There is no alternative good way in this language .
Thanks.