谁能帮帮我?
我正在尝试将其拆分sentences[]
为words[]
. 但它显示Syntax error on token "j", delete this token
...
我的代码是:
try
{
int j;
String paragraph = sample.readFileString(f);
String[] sentences = paragraph.split("[\\.\\!\\?]");
for (int i=0;i<sentences.length;i++)
{
System.out.println(i);
System.out.println(sentences[i]);
for( j=0;j<=i;j++)
{
String word[j]=sentences[i].split(" ");
}
}
}
我能做些什么?