try block not followed
What happens when a try block is neither followed by a try block nor a finally block?
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Jignesh TrivediPosted Nov 12, 2013, 6:41 AM
hi,
If you use Try block without catch and finally block it it compile time error.
so It is not possible try block without catch or finally block.
VulpesPosted Nov 12, 2013, 5:40 AM
1. One or more catch blocks; or
2. A finally block.
In the case of #1, the catch block(s) may be optionally followed by a finally block.
Consequently, a try block must be followed by either a catch or finally block and, if you fail to do that, the compiler will issue an error message.
Jeetendra GundPosted Nov 12, 2013, 3:52 AM
Tell me your exact question or problem regarding try block.
Thanks,
Jeetendra