Search Interview Questions | More than 3000 questions in repository. There are more than 900 unanswered questions. Click here and help us by providing the answer. Have a video suggestion. Click Correct / Improve and please let us know. |
|
| ||||
Interview Questions and Answers | ||||
| ||||
Ans. It's an exception that is thrown when we attempt to add value of an incompatible type to an array. For example - Object[] strArray = new String[2]; strArray[0] = 5; In this code, strArray reference of type Object has currently been assigned the String array but at line 2 we are trying to add an integer value. | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  arrays   ArrayStoreException | ||||
Related Questions | ||||
What is the difference between ArrayIndexOutOfBoundException and ArrayStoreException? | ||||
Will this give compile time error ? Object[] strArray = new String[2]; strArray[0] = 5; | ||||