Search Interview Questions | Click here and help us by providing the answer. 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.  | ||||
Object[] strArray = new String[2]; strArray[0] = 5;  | ||||