私はを使用するメソッドを持っているVector
のを変換しようとしていますObjects
toString()
(String[]) mObjectVector.toArray(new String[mObjectVector.size()])
また
(String[]) mObjectVector.toArray(new Object[mObjectVector.size()])
ただし、次のエラーが発生します。
java.lang.ArrayStoreException: source[0] of type .../myObjectType; cannot be stored in destination array of type [Ljava/lang/String;
と
java.lang.ClassCastException: [Ljava.lang.Object;
なにが問題ですか?