what is an exceptions bullwhat is an exception


What is an Exceptions ?

• What is an exception?
• try-catch
• finally
• The different kinds of exceptions
• Multiple catch clauses
• The throws clause
• Throwing exceptions
• Writing your own exception classes

What is an Exception?
Consider this program:
public class HelloThere {

public static void main(String[] args) {
System.out.println("Hello " + args[0]);
}

}
Suppose it's run like this:
$ java HelloThere
Remember that's there's no args[0]. Here's what you get:
$ java HelloThere
java.lang.ArrayIndexOutOfBoundsException: 0
at HelloThere.main(HelloThere.java:5)
This is not a crash. The virtual machine exits generally. All memory is cleaned up. All resources are released. 

Request for Solution File

Ask an Expert for Answer!!
JAVA Programming: what is an exceptions bullwhat is an exception
Reference No:- TGS0284880

Expected delivery within 24 Hours