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 4/10 Helpfulness 1/10

Contents


More Related Answers

  • importance of finally block in java
  • JavaScript try...catch...finally Statement
  • does finally block executed after crash
  • java program for try catch finally
  • javascript try...catch...finally
  • Java try...finally block
  • c# try catch finally
  • where do you use try catch block in framework
  • try-catch-finally
  • javascript try catch finally return
  • what is finally
  • Using try with finally block
  • Explain try & catch finally block in Java
  • finally keyword
  • finally always after try catch
  • try catch finally
  • Java finally block
  • Will FINALLY block execute in the method body, if there are no exceptions in try or catch block
  • can we have multiple catch block for a try 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 4/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.