-4
私はstring.splitを実行してから配列の最初の位置を呼び出しましたが、なんらかの理由ですべての配列結果が表示されます。これはJavaで分割するには?
try {
String xx = "";
for (int i = 0; i < row; i++) {
for (int c = 0; c < col; c++) {
Cell z = s.getCell(c, i);
xx = xx + z.getContents() + "\n";
}
xx = xx + "\n";
}
//I do the split here but the result[0] = all the information
String result[] = xx.split(",");
textView.setText(result[0]);
} catch (Exception e) {
}
私のコードであり、これは出力の画像です: Description of the output
あなたは 'Strings'の間に'、 'を追加していません –
あなたは私を助けることができますか? – jose
'z.getContents()'が返す文字列の形式は何ですか? 'String'の例を挙げてください。 –