Extracting array from a Vector
Hello,
I have a vector that stores arrays but when I am trying to extract those arrays I get exception
"incompatible types
found: java.lang.Object
required: java.lang.String[]"
This how I define array that is going to be stored in Vector
String [] elms =new String[8];
This is an array that suppose to store extracted data from Vector
String [] outOfVector =new String[8];
This is how I populate vector
while (res.next())
{
elms[0]=res.getString("id");
elms[1]=res.getString("SERIAL_NUMBER");
elms[2]=res.getString("DESCRIPTION");
elms[3]=res.getString("PRICE");
elms[4]=res.getString("part_quantity");
elms[5]=res.getString("SUPPLIER");
elms[6]=res.getString("SUPPLY_TYPE");
elms[7]=res.getString("SUPPLY_OFFICE");
parts.add(elms);
}
and this is how I try to get the first array out of the vector
outOfVector=parts.get(1);
What am I doing wrong And how can I fix it?
Thanks

