I am trying to cast a 2D Object array column as a 1D String array; I have no problem getting the data itself, but it is the data types which creates a run-time error:
Exception in thread "AWT-EventQueue-0" java.lang.ClassCastException: java.lang.String cannot be cast to [Ljava.lang.String;
This is an example of the code fragment I am working with:
Object[][] currentData = BackOffice.getData();
String[] dataWanted = null;
for (int i=0; i<currentData.length; i++)
dataWanted = (String[])currentData[i][1];
I thought I could get away with casting using (String[]), but obviously not... any help appreciated!