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

Hi sir, I'm confused between .net and java. What to choose for a career. I have little bit knowledge of asp.net. Please guide me for this. Thank you
Hello Kirit, The application which were devloped about 2 decades back was mostly coded in java and so you will see so many of the application (in several company and outside) written in java. .Net(collectively...
Kirit
How many years of experience should a good Java trainer need?
Minimum 4 years, actually it depends how much exposure you got and how you worked in project(s)
Nayan
0 0
5
in java every thing is in the form of object
Everything is object is java except primitive data types like int,long etc..thats the reason its not 100 % object oriented language..
Abrar

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

Ask a Question

Related Lessons

On the Job training is always best
On the job training always provides an opportunity to learn the best industry practices. While you work on real time you would encounter many challenges that will force you to learn many new things. Class...
M

Java: A Quick Overview
Not purely Object Oriented: It doesn't support multiple inheritence, it supports primitive data types and static members. Doesn’t support multiple inheritance: Reason is diamond problem i.e.,...

Why Should We Learn Java Language?
Most of starters has confusion today that which of the programming language should be chosen to work on. It totally depends upon your need. As per my opinion, if you want to grow your career in IT industry...

Internet of Things, Social Media Becoming Part of E-Discovery Landscape
The days when e-discovery consisted of handing over copies of e-mails to address Freedom of Information Act (FOIA) requests, compliance regulations or other legal obligations are over. Now, it's just as...

Understanding concept of Inheritance in Java
Inheritance: Acquiring a properties and methods from Parent class to Child class. For example, In some cases we can hear from any one of your relative or your friends will say like that "You are bahaving...

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