UrbanPro

Learn Java Training from the Best Tutors

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

Search in

What is an Exception in Java?

Asked by Last Modified  

5 Answers

Learn Java

Follow 0
Answer

Please enter your answer

Tutor

Exception is the type of class which we are using in java to check and validate our code. if there is any problem in our code then compiler will throw exception. there are two types of exception. one is compile time and another one is runtime. compile time exception will only throw when code have any...
read more
Exception is the type of class which we are using in java to check and validate our code. if there is any problem in our code then compiler will throw exception. there are two types of exception. one is compile time and another one is runtime. compile time exception will only throw when code have any syntax problem and runtime exception will throw when we will write any wrong logic. read less
Comments

Exception is a class in java which checks for errors in the code and allows them to handle. Exceptions are 2 types: 1) Compile time exception 2) Runtime exception Compile time Exception: The Syntax errors of the code are known as Compile time errors Run time Time Exception: These are logical errors...
read more
Exception is a class in java which checks for errors in the code and allows them to handle. Exceptions are 2 types: 1) Compile time exception 2) Runtime exception Compile time Exception: The Syntax errors of the code are known as Compile time errors Run time Time Exception: These are logical errors when these errors occurs JVM throw exception and we need to handle them using try catch else program gets terminated read less
Comments

I am looking for java faculty job/tutor job

Exceptions are events that occur during the execution of programs that disrupt the normal flow of instructions (e.g. divide by zero, array access out of bound, etc.). In Java, an exception is an object that wraps an error event that occurred within a method and contains: Information about the error including...
read more
Exceptions are events that occur during the execution of programs that disrupt the normal flow of instructions (e.g. divide by zero, array access out of bound, etc.). In Java, an exception is an object that wraps an error event that occurred within a method and contains: Information about the error including its type. read less
Comments

Teacher

An Error "indicates serious problems that a reasonable application should not try to catch." while An Exception "indicates conditions that a reasonable application might want to catch." Error along with RuntimeException & their subclasses are unchecked exceptions. All other Exception classes are...
read more
An Error "indicates serious problems that a reasonable application should not try to catch." while An Exception "indicates conditions that a reasonable application might want to catch." Error along with RuntimeException & their subclasses are unchecked exceptions. All other Exception classes are checked exceptions. Checked exceptions are generally those from which a program can recover & it might be a good idea to recover from such exceptions programmatically. Examples include FileNotFoundException, ParseException, etc. A programmer is expected to check for these exceptions by using the try-catch block or throw it back to the caller On the other hand we have unchecked exceptions. These are those exceptions that might not happen if everything is in order, but they do occur. Examples include ArrayIndexOutOfBoundException, ClassCastException, etc. Many applications will use try-catch or throws clause for RuntimeExceptions & their subclasses but from the language perspective it is not required to do so. Do note that recovery from a RuntimeException is generally possible but the guys who designed the class/exception deemed it unnecessary for the end programmer to check for such exceptions. Errors are also unchecked exception & the programmer is not required to do anything with these. In fact it is a bad idea to use a try-catch clause for Errors. Most often, recovery from an Error is not possible & the program should be allowed to terminate. Examples include OutOfMemoryError, StackOverflowError, etc. Do note that although Errors are unchecked exceptions, we shouldn't try to deal with them, but it is ok to deal with RuntimeExceptions(also unchecked exceptions) in code. Checked exceptions should be handled by the code. read less
Comments

Java Developer

We can Say Exception is an event which terminates the normal execution of a program
Comments

View 3 more Answers

Related Questions

I am looking for live project trainer for Java j2ee near Hinjewadi ph 3 or near Bavdhan. Thanks
I am a passoniate software enginner and a professional trainer. I can provide support for your live project.
Richa
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 selection sort in java?
Selection sort is a sorting algorithm. You can implement this algorithm in any language. The basic idea is to select the smallest element of the array and placing it to the head of array. This step needs...
Snehashis
How many classes will it take to learn core Java?
25-35 . depends on the student's previous knowledge on any programming languages
Gene

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

Ask a Question

Related Lessons

Necessity of Theory and Practical in Computer Science.
Upon studying a subject both theory and practical are important. Usually many schools concentrate more on theory and the marks not on the practical. Other and opposite kind of people prefer practical...

jOOQ 3.10 Supports JPA Attribute Converter
One of the cooler hidden features in jOOQ is the JPADatabase, which allows for reverse engineering a pre-existing set of JPA-annotated entities to generate jOOQ code. For instance, you could write these...

Importance of Constructor's Visibility.
While developing program or implementing Singleton pattern we have learnt to mention constructor as private and known reason is -> to blocked its direct call from outside of class. But did we think...
M

Method Overloading vs Method Overriding
1. Method Overloading: Method overloading means a same method with same name can have different implementations/body by changing one of the follwing thing: 1) Number of Parameters 2) Order of Parameters 3)...

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

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 >

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 >

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