Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6684853
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T04:59:17+00:00 2026-05-26T04:59:17+00:00

Can some checked exceptions be converted to unchecked exceptions. When I read the docs

  • 0

Can some checked exceptions be converted to unchecked exceptions.

When I read the docs from
jms, I found some method convert checked exceptions into unchecked. I do not need to use “throws” anymore. Is this a feature of Java?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T04:59:18+00:00Added an answer on May 26, 2026 at 4:59 am

    You can also convert yourself exceptions from checked to unchecked:

    try {
        ...
    } catch (CheckedException ex) {
        throw new UncheckedException(ex);
    }
    

    where the fictional class CheckedException is the checked excetion that is thrown by the code within the dots, and UncheckedException extends RuntimeException or one of its descendants.

    Without going into the checked vs unchecked exception debate, I would like to point out that is a good practice to convert exception as you go up with your abstraction layers, also your exception should be less specific about the implementation details.

    For instance, if I’ve an interface PDFDocument with a method save(), it shouldn’t throw an IOException, because you could have an implementation saving to database, another to filesystem and a third saving to a remote site. Instead you could create your own exceptions or use one of the standard ones if it fits.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hi can some body help me how to call process.existed() method in c#? Actually
Consider some code that can throw a checked exception (an exception of type Exception
Can some one specify the windows API, one need to use in order to
Can some one post an example of using syslog outputter for log4r, I am
Can some one explain to me the difference between categories and inheritance in Objective
can some on help me on how i can reference images i have all
Can some one recommend any free program which counts the number of clicks Clicked
Can some one please guide me to understand which jar file i need to
Can some suggest a good a free memory profiling tool which will show memory
Can some one shed some light on the difference between XML and XMI? Can

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.