myStrings is 2 long
BUILD SUCCESSFUL (total time: 0 seconds)
The toArray(Object ar) method of collection class often throws this exception when the invoking array has any element which is not of type in the bracketed array.
so, this method is just to ensure the type of element to be same as of target array. If it thrown any exception, then we can just say its because of any software error when the wrong type data went in the invoking array.