String pathname = "E:\\workspace\\stanfordner\\sample.txt";
File filename = new File(pathname); // 要读取以上路径的input。txt文件
String query_id = filename.getName().substring(0,filename.getName().lastIndexOf("."));
query_id返回即为 sample。
String pathname = "E:\\workspace\\stanfordner\\sample.txt";
File filename = new File(pathname); // 要读取以上路径的input。txt文件
String query_id = filename.getName().substring(0,filename.getName().lastIndexOf("."));