answersLogoWhite

0

How are exceptions generated?

Updated: 12/12/2022
User Avatar

Wiki User

13y ago

Best Answer

Exceptions are generated by the Java Virtual Machine during program execution. When the JVM comes across a piece of code that it cannot execute properly or a piece of code that will create issues when the JVM executes it will generate an exception. Ex: divide by 0 or trying to access a null variable etc

The language also has syntax that can catch and handle these situations. It is called the try - catch - finally construct.

User Avatar

Wiki User

13y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How are exceptions generated?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

Is it essential to catch all the exceptions and justify your answer?

Checked exceptions should be caught. Otherwise, compile errors are generated.


Why do eukaryotic cells require mitochondria?

As an energy source (NOTE there re exceptions).They need energy for functioning. This energy is generated by mitochondria


Why use catch keyword in java?

no, because catch is used to handle exceptions which are generated from try block


What are the types of exception in java?

Exceptions are of two types: checked exceptions and unchecked exceptions.


How do you make a sentence with exceptions?

I'm ruling out exceptions as I go.


How is the solar energy generated?

it is generated by the sun


Where can geothermal energy be generated?

It can be generated somewhere.


What are the release dates for The Exceptions - 2012?

The Exceptions - 2012 was released on: USA: 2012


How do you code the program using arithmetic exceptions?

Never.A program should handle exceptions, but should NEVER USE exceptions to control program flow.


In uk electricity is generated as?

in the uk electricity is generated at ?


What is a tsunami and how is it generated?

A Tsunami is generated by an underwater earthquake.


What is internally generated revenue?

Revenue that is generated internally!