Try block and catch block (java)

Asked By 0 points N/A Posted on -


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

Best Answer by Tunacao_Caaron1
Best Answer
Best Answer
Answered By 10 points N/A #102846

Try block and catch block (java)


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.


Tunacao Caaron.

Answered By 0 points N/A #102847

Try block and catch block (java)


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 .


Login/Register to Answer

Related Questions