How to exit without executing the final?

AnswerBot
1y

To exit without executing the final, use the 'return' statement or 'exit' function.

  • Use the 'return' statement to exit a function or method without executing the remaining code.

  • In some programming lang...read more

Neetu Singh
5y
If you write system.exit() in try block ,It will not execute finally block. The program will be terminated after System.exit() statement.
Code:
try{ System.out.println("I am in try block"); Syst...read more
Help your peers!
Add answer anonymously...

Top DXC Technology Professional 1 Product Developer interview questions & answers

DXC Technology Professional 1 Product Developer Interview Questions
Stay ahead in your career. Get AmbitionBox app
qr-code
Helping over 1 Crore job seekers every month in choosing their right fit company
65 L+

Reviews

4 L+

Interviews

4 Cr+

Salaries

1 Cr+

Users/Month

Contribute to help millions
Get AmbitionBox app

Made with ❤️ in India. Trademarks belong to their respective owners. All rights reserved © 2024 Info Edge (India) Ltd.

Follow us
  • Youtube
  • Instagram
  • LinkedIn
  • Facebook
  • Twitter