我有一个String数组包含“在字符串的开头和结尾我想删除它 下面是我尝试的代码,但它不起作用
String str="98900205670001613 jonh mathews -66,822.60 65,000.00 65,000.00 -1,822.60 "
String[] tokens= new String[15];
tokens=line.split("\\s+");
tokens=replace(tokens,"\"","");
static String[] replace(String[] arr, String find, String replace) {
for (int i = 0; i < arr.length; i++) {
if (arr[i] == find) {
arr[i] = replace;
}
}
return arr;
}