I want to declare an array out side the for loop and assign values to the string array. but i am getting an error. please give me a suggestion to do this. my code is given below.
String[][] data=null;
for (int x = 0; x < dtm.getRowCount(); x++) {
data = {{"sds","sdsds"}}; <<< im getting error in here.
}
DefaultTableModel model = new DefaultTableModel(data, headers);