G
Guest
Gast
Code:
public boolean writeTable(ModelTable table) {
boolean p = true;
String s = new String();
for (int i = 0; i < table.getRowCount(); i++) {
s = (String) table.getValueAt(i, 0) + "|"
+ (String) table.getValueAt(i, 1) + "|"
+ (String) table.getValueAt(i, 2) + "|"
+ (String) table.getValueAt(i, 3) + "|"
+ (String) table.getValueAt(i, 4) + "|";
try {
aWriter.write(s);
aWriter.newLine();
} catch (IOException ex) {
p = false;
}
}
return p;
}
Ich bekomme beim compilieren immer eine NullPointerException bei " aWriter.write(s); ".
Wer kann mir weiterhelfen?