answersLogoWhite

0

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

14y ago

Still curious? Ask our experts.

Chat with our AI personalities

SteveSteve
Knowledge is a journey, you know? We'll get there.
Chat with Steve
RossRoss
Every question is just a happy little opportunity.
Chat with Ross
ProfessorProfessor
I will give you the most educated answer.
Chat with Professor

Add your answer:

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