java excel导入getDataList(Class<E> cls, int
展开全部
import java.util.ArrayList;
import java.util.Set;
import java.util.HashSet;
import java.util.Iterator;
public class File_Double_Line{
public static void main(String args[])throws IOException{
BufferedReader in_ = new BufferedReader(new FileReader("File_Double_Line.java"));
Set list= new HashSet();
String line;
while((line=in_.readLine())!=null){
if(line.length()>0){
char c=line.charAt(0);
if(c0x39){//去除非数字开头的行
continue;
}
list.add(line);
}
}
in_.close();
for(Iterator it = list.iterator(); it.hasNext(); ){
System.out.println(it.next());//输出结果
}
}
}
来现成的代码
import java.util.Set;
import java.util.HashSet;
import java.util.Iterator;
public class File_Double_Line{
public static void main(String args[])throws IOException{
BufferedReader in_ = new BufferedReader(new FileReader("File_Double_Line.java"));
Set list= new HashSet();
String line;
while((line=in_.readLine())!=null){
if(line.length()>0){
char c=line.charAt(0);
if(c0x39){//去除非数字开头的行
continue;
}
list.add(line);
}
}
in_.close();
for(Iterator it = list.iterator(); it.hasNext(); ){
System.out.println(it.next());//输出结果
}
}
}
来现成的代码
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询