Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

What are different types of Exceptions?.

Answer Posted / gagan jain

common exceptions:
Java has several predefines exceptions. the most common
exceptions that you may encounter are described below.

Arithmetic Exception:-
This exception is thrown when an exceptional arithmetic
condition has occurred. for example, a division by zero
generates such an exception.

Nullpointer Exception:-
This exception is thrown when an application attempts to
use null where an object is required. An object that has
not been allocated memory holds a null value. the
situations in which an exception is thrown include:
1. Using an object without allocating memory for it.
2. Calling the methods of a null object.
3. Accessing or modifying the attributes of null obect.

ArrayIndexoutof Bounds Exception
The exception Arrayindexoutofbounds Exceptions is thrown
when an attempt is made to access an array element beyond
the index of the array. for example, if you try to access
the eleventh element of an array that's has only ten
elements, the exception will be thrown.

Is This Answer Correct ?    16 Yes 9 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is java abstraction with example?

980


What is the difference between double and float variables in java?

1082


Why convert an applet to an application?

1043


What are the three types of design patterns?

918


Explain differences between collection api and stream api?

1088


Can we call the run() method instead of start()?

984


What is the significance of listiterator?

1020


we have syntax like for(int var : arrayName) this syntax is to find whether a number is in the array or not.but i want to know how to find that number's location.

1985


What types of index data structures can you have in java?

1129


Difference between concurrent hashmap and hashtable and collections

1004


when to use ArrayList and when to use HashMap in webApplication.

4590


What is the use of list in java?

936


Explain the difference between an Interface and an Abstract class?

1113


Can we override constructors in java?

1072


How do you convert string to int in java?

1009