Huawei
Company
Category
What is the correct sequence
try,catch,finally
try1,catch1,catch2,try2,finally
try1,catch1,try2,catch2,finally
Read Solution (Total 4)
-
- try then catch then finally
so try catch finally is the correct sequence as we can have many catch with one try and finally always comes in end - 9 years agoHelpfull: Yes(4) No(0)
- try catch,finally
- 9 years agoHelpfull: Yes(0) No(0)
- IN EXCEPTION HANDLING THERE IS try,catch,finally block to handle exceptions
syntax :try
{
//Protected code
}catch(ExceptionType1 e1)
{
//Catch block
}catch(ExceptionType2 e2)
{
//Catch block
}catch(ExceptionType3 e3)
{
//Catch block
} there fore for 1 try block we can have multiple catch block so in the above options try,catch,finally is correct option - 9 years agoHelpfull: Yes(0) No(0)
- if there is multiple exception handling then option 3. will be correct.
- 6 years agoHelpfull: Yes(0) No(0)
Huawei Other Question