Breaking News: Grepper is joining You.com. Read the official announcement!
Check it out

Can we create a finally block without creating a catch block?

Pragya Keshap answered on February 4, 2023 Popularity 5/10 Helpfulness 1/10

Contents


More Related Answers

  • JavaScript try...catch...finally Statement
  • importance of finally block in java
  • does finally block executed after crash
  • c# try catch finally
  • java program for try catch finally
  • Java try...finally block
  • javascript try...catch...finally
  • javascript try catch finally return
  • where do you use try catch block in framework
  • try-catch-finally
  • Explain try & catch finally block in Java
  • Using try with finally block
  • what is finally
  • finally keyword
  • finally always after try catch
  • try catch finally
  • Java finally block
  • can we have multiple catch block for a try block
  • Will FINALLY block execute in the method body, if there are no exceptions in try or catch block
  • can we have any code between try and catch blocks
  • try catch finally example
  • Java finally Keyword
  • try...catch...finally
  • Finally block
  • Why you need to close the streams in finally block?
  • What will happen if you put the return statement or System.exit () on the try or catch block? Will finally block execute?
  • try, catch, throw, finally
  • where finally block will not be executed

  • Can we create a finally block without creating a catch block?

    0

    Yes. A finally block can follow a try block or catch block. So we

    can defined a finally block just after a try block

    https://www.tutorialspoint.com/Can-finally-block-be-used-without-catch-in-Java#:~:text=Yes%2C%20it%20is%20not%20mandatory%20to%20use%20catch%20block%20with%20finally.

    Popularity 5/10 Helpfulness 1/10 Language java
    Source: Grepper
    Link to this answer
    Share Copy Link
    Contributed on Feb 04 2023
    Pragya Keshap
    0 Answers  Avg Quality 2/10


    X

    Continue with Google

    By continuing, I agree that I have read and agree to Greppers's Terms of Service and Privacy Policy.
    X
    Grepper Account Login Required

    Oops, You will need to install Grepper and log-in to perform this action.