Is it possible to write a try within a try statement ?

Is it possible to write a try within a try statement ?

Yes, 
try {
  try {
    throw new Error(\"oops\");
  }
  finally {
    console.log(\"finally\");
  }
}
catch (ex) {
  console.error(\"outer\", ex.message);
}

By:Sumit Tripathi
Date:2021-05-15 00:00:00

Post Your Answers


User Email:

User Name:
Answers:

Related Java Subjective Links

Java Subjective interview questions and answers for experienced and fresher