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 1076197
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T21:22:40+00:00 2026-05-16T21:22:40+00:00

We all know it is needed. But WHY is it needed in Java alone,

  • 0

We all know it is needed.

But WHY is it needed in Java alone, when other similar languages that have exception handling capablities don’t require us to write “throws Exception”? Is there anyone who knows what was happening when Java language was designed and why they made it that way? Just curious.

P.S. This may not be a practical or really necessary question – it might not help me in anyway with my ongoing projects. But certain language features kindle my curiosity 😀

Edit
Looks like my question was very vague! I think I worded the question wrongly. We need to use the “throws Exception” kind of syntax at some points during programming when dealing with Java code. But something like that is never needed in C# or C++ or even VB.Net and PHP. So why Java alone insists on this?

  • 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-16T21:22:41+00:00Added an answer on May 16, 2026 at 9:22 pm

    As other answers here have pointed out, the throws clause is only required for checked exceptions, which is a feature that currently only exists in Java.

    The official answer as to why Java has checked exceptions is well documented:

    Why did the designers decide to force
    a method to specify all uncaught
    checked exceptions that can be thrown
    within its scope? Any Exception that
    can be thrown by a method is part of
    the method’s public programming
    interface. Those who call a method
    must know about the exceptions that a
    method can throw so that they can
    decide what to do about them. These
    exceptions are as much a part of that
    method’s programming interface as its
    parameters and return value.

    However, this decision is highly controversial, even within the Java community:

    Recently, several well-regarded
    experts, including Bruce Eckel and Rod
    Johnson, have publicly stated that
    while they initially agreed completely
    with the orthodox position on checked
    exceptions, they’ve concluded that
    exclusive use of checked exceptions is
    not as good an idea as it appeared at
    first, and that checked exceptions
    have become a significant source of
    problems for many large projects.
    Eckel takes a more extreme view,
    suggesting that all exceptions should
    be unchecked; Johnson’s view is more
    conservative, but still suggests that
    the orthodox preference for checked
    exceptions is excessive. (It’s worth
    noting that the architects of C#, who
    almost certainly had plenty of
    experience using Java technology,
    chose to omit checked exceptions from
    the language design, making all
    exceptions unchecked exceptions. They
    did, however, leave room for an
    implementation of checked exceptions
    at a later time.)

    Personally, I find checked exceptions to be useful only when your API makes a habit of catching all exceptions and re-throwing them as something appropriate to your abstraction layer. For example, an in-memory object cache that happens to use a disk or SQL backend to cache data should never throw IOException or SQLException — instead, it should throw (and declare) some user-defined exception like CacheFailureException or similar.

    Also, you might find Ned Batchelder’s article Exceptions in the Rainforest illuminating in regard to this question.

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

Sidebar

Ask A Question

Stats

  • Questions 535k
  • Answers 535k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer i would suggest you take a look at the regular… May 17, 2026 at 1:12 am
  • Editorial Team
    Editorial Team added an answer No global variables, or shared variables whatsoever Then, as the… May 17, 2026 at 1:12 am
  • Editorial Team
    Editorial Team added an answer This should do it. Note that you don't need to… May 17, 2026 at 1:12 am

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

We have a large (>500,000 LOC) Java system that depends on 40-50 OSS packages.
I've been a java developer for a couple years and have heard that you
I know this sounds like a broad question but I can narrow it down
I would like to know how you set up your projects in Java. For
In a similar way to codeigniter I want to catch all requests and rewrite
In Delphi, I want to be able to create an private object that's associated
There is an actual running Java ServerPages (JSP) application within a *NIX box which
I'm having a bit of a problem building a Java Enterprise Edition web application
I got a project in mind that makes it worth to finally take the
I have an application where many unit tests use a real connection to an

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.