UrbanPro

Learn Java Training from the Best Tutors

  • Affordable fees
  • 1-1 or Group class
  • Flexible Timings
  • Verified Tutors

Search in

What is the difference between checked and unchecked exceptions?

Asked by Last Modified  

15 Answers

Learn Java

Follow 1
Answer

Please enter your answer

Professional Tutor with 15 years of experience.

The main difference between checked and unchecked exception is that the checked exceptions are checked at compile-time while unchecked exceptions are checked at runtime
Comments

Certified Hadoop Developer with Spark Expertise

checked exception has been thrown at the time of compilation, we can handle in two ways we can handle this by try catch block or we can throw this exception. Un checked exceptions are the exceptions thrown at the time of run time, we can handle this by using try and catch blocks.
Comments

Software Engineer with 15 years of Professional experience in MNCs (JP Morgan, TCS, Mastek)

A checked exception must either be handled within a catch block or declared with a throws clause in the method declaration. If not, the compiler will throw an error. There are no such restrictions with unchecked exceptions.
Comments

Software Engineer with 15 years of Professional experience in MNCs (JP Morgan, TCS, Mastek)

A checked exception usually occurs out of an exceptional situation that your application should reasonably try to recover from. For example, on catching a FileNotFoundException your program could prompt the user for the correct file path again. An unchecked exception usually occurs because of a bug...
read more
A checked exception usually occurs out of an exceptional situation that your application should reasonably try to recover from. For example, on catching a FileNotFoundException your program could prompt the user for the correct file path again. An unchecked exception usually occurs because of a bug in your application. Hence, instead of catching the exception, you fix the underlying logic of your program. For example, if you incorrectly access an array at an index that lies outside its size, an IndexOutOfBoundsException is thrown. read less
Comments

Java Tutor

Checked exception are the subclass of Exception except RuntimeException . The code which can throw these exception must be either put in Try Catch block or declare Throws in method signature. It is checked during compile time Unchecked exception are exception which generate at runtime,
Comments

Senior Software Engineer

Checked Exception in Java is all those Exception which requires being catches and handled during compile time. If Compiler doesn’t see try or catch block handling a Checked Exception, it throws Compilation error. Now Which Exception is checked Exception and Why Checked Exception are introduced in first...
read more
Checked Exception in Java is all those Exception which requires being catches and handled during compile time. If Compiler doesn’t see try or catch block handling a Checked Exception, it throws Compilation error. Now Which Exception is checked Exception and Why Checked Exception are introduced in first place? All the Exception which are direct sub Class of Exception but not inherit RuntimeException are Checked Exception. read less
Comments

Trainer

There are two types of exceptions: checked exceptions and unchecked exceptions. The main difference between checked and unchecked exception is that the checked exceptions are checked at compile-time while unchecked exceptions are checked at runtime.
Comments

More than 12 years of experience in IT Industry including Science/Computer teaching

1) Checked Exception The classes that extend Throwable class except RuntimeException and Error are known as checked exceptions e.g.IOException, SQLException etc. Checked exceptions are checked at compile-time. 2) Unchecked Exception The classes that extend RuntimeException are known as unchecked...
read more
1) Checked Exception The classes that extend Throwable class except RuntimeException and Error are known as checked exceptions e.g.IOException, SQLException etc. Checked exceptions are checked at compile-time. 2) Unchecked Exception The classes that extend RuntimeException are known as unchecked exceptions e.g. ArithmeticException, NullPointerException, ArrayIndexOutOfBoundsException etc. Unchecked exceptions are not checked at compile-time rather they are checked at runtime. read less
Comments

Principal Software Engr with good JAVA, J2EE, SQL skills

Checked Exceptions - compiler can predict when/where the exception is going to be thrown in the code. Ex: FileNotFoundException. UnChecked Exceptions - compiler can NOT predict when/where the exception is going to be thrown in the code. Ex: NullPointerException
Comments

Software Development Trainer

Checked exceptions are checked at compile time. Like if you are trying to read a file, then there are chances of getting an exception. So compiler forces use to use either try...catch block or use throws(at function level). But unchecked exceptions are which ain't checked for at compile time. Like...
read more
Checked exceptions are checked at compile time. Like if you are trying to read a file, then there are chances of getting an exception. So compiler forces use to use either try...catch block or use throws(at function level). But unchecked exceptions are which ain't checked for at compile time. Like in case you are dividing a number via another. There are chances of getting divide by zero exception but compiler doesn't force you to use try...catch or throws. read less
Comments

View 13 more Answers

Related Questions

Can a class have interface and vice-versa?
how its possible both has different meaning you cant enclosed it
Deepa
0 0
7
How to find a good Java coaching centre?
Its all depends on the trainer and his expertise. I would suggest you to get feedback from the students who already joined.
Abirami
1 0
6
Can we use pointer in java?
No, we can't. Java has reference variables which contains address of objects. The reference variables are substitute to pointers in java. But, we cannot perform mathematical operations on reference variables...
Manish
What is the general syllabus covered in core Java training from any institution?
you can check the syallbus on http://felix-its.com/java-training-pune/
Shiv Kohli
0 0
5

What is meant by Java full stack and angular Java?

Fullstack development means the combination of UI technologies (client-side) + Backend technology (server-side). UI technology like Angular or ReactJs (Front end technologies). It's all about client-side...
Anuradha

Now ask question in any of the 1000+ Categories, and get Answers from Tutors and Trainers on UrbanPro.com

Ask a Question

Related Lessons


Java inheritance example
Answer these questions Answer the above question

Final, Finally And Finalize In Java
Final: 1. It is a non access modifier that can be applied to variables,methods and to class. 2. Final means non-changable. Final variable: 1. If a variable is declared as final it can't be re-assigned. 2....


CoreJAVA
Core Java Training High Level Course Content Trained by Java Architect 1. Core Java Programming Introduction of Java 2. Data types and Operators 3. Control Flow statements 4. OOPS and its application...
A

Recommended Articles

Java is the most commonly used popular programming language for the creation of web applications and platform today. Integrated Cloud Applications and Platform Services Oracle says, “Java developers worldwide has over 9 million and runs approximately 3 billion mobile phones”.  Right from its first implication as java 1.0...

Read full article >

Java is the most famous programming language till date. 20 years is a big time for any programming language to survive and gain strength. Java has been proved to be one of the most reliable programming languages for networked computers. source:techcentral.com Java was developed to pertain over the Internet. Over...

Read full article >

Designed in a flexible and user-friendly demeanor, Java is the most commonly used programming language for the creation of web applications and platform. It allows developers to “write once, run anywhere” (WORA). It is general-purpose, a high-level programming language developed by Sun Microsystem. Initially known as an...

Read full article >

In the domain of Information Technology, there is always a lot to learn and implement. However, some technologies have a relatively higher demand than the rest of the others. So here are some popular IT courses for the present and upcoming future: Cloud Computing Cloud Computing is a computing technique which is used...

Read full article >

Looking for Java Training Classes?

Learn from the Best Tutors on UrbanPro

Are you a Tutor or Training Institute?

Join UrbanPro Today to find students near you
X

Looking for Java Training Classes?

The best tutors for Java Training Classes are on UrbanPro

  • Select the best Tutor
  • Book & Attend a Free Demo
  • Pay and start Learning

Learn Java Training with the Best Tutors

The best Tutors for Java Training Classes are on UrbanPro

This website uses cookies

We use cookies to improve user experience. Choose what cookies you allow us to use. You can read more about our Cookie Policy in our Privacy Policy

Accept All
Decline All

UrbanPro.com is India's largest network of most trusted tutors and institutes. Over 55 lakh students rely on UrbanPro.com, to fulfill their learning requirements across 1,000+ categories. Using UrbanPro.com, parents, and students can compare multiple Tutors and Institutes and choose the one that best suits their requirements. More than 7.5 lakh verified Tutors and Institutes are helping millions of students every day and growing their tutoring business on UrbanPro.com. Whether you are looking for a tutor to learn mathematics, a German language trainer to brush up your German language skills or an institute to upgrade your IT skills, we have got the best selection of Tutors and Training Institutes for you. Read more