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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T03:16:31+00:00 2026-06-04T03:16:31+00:00

In Java, how a compiler will identify that there is a checked exception? I

  • 0

In Java, how a compiler will identify that there is a checked exception? I mean how it is identifying it?

  • 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-06-04T03:16:32+00:00Added an answer on June 4, 2026 at 3:16 am

    Right from the docs:

    A compiler for the Java programming language checks, at compile time,
    that a program contains handlers for checked exceptions, by analyzing
    which checked exceptions can result from execution of a method or
    constructor. For each checked exception which is a possible result,
    the throws clause for the method (§8.4.6) or constructor (§8.8.5) must
    mention the class of that exception or one of the superclasses of the
    class of that exception. This compile-time checking for the presence
    of exception handlers is designed to reduce the number of exceptions
    which are not properly handled.

    The unchecked exceptions classes are the class RuntimeException and
    its subclasses, and the class Error and its subclasses. All other
    exception classes are checked exception classes. The Java API defines
    a number of exception classes, both checked and unchecked. Additional
    exception classes, both checked and unchecked, may be declared by
    programmers. See §11.5 for a description of the exception class
    hierarchy and some of the exception classes defined by the Java API
    and Java virtual machine.

    So basically it looks at the code, if it comes across an exception, looks up the inheritance hierarchy of the exception to decide if it is checked or unchecked.

    Read

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

Sidebar

Related Questions

I googled,I checked wikipedia.None of them helped me to find an official java compiler
Java has compiler checked exceptions . When I made transition to C++, I learned
Will the Java Compiler optimize simple repeated math operations like: if (prevX / width
I'm writing a program in C# that will compile java files using the java
Say I have below lines any in a Java class, System.out.println(start); if(true)//The compiler will
How can a C++ or Java compiler make sure that none of the member
Goal I am making a Java class that will give enhanced usability to arrays,
I am led to believe that the java compiler does all the work of
I'm trying to develop a bash build script for a Java project that will
It appears that when you type in a number in Java, the compiler automatically

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.