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。
2022-09-19 15:45:18
String pathname = "E:\\workspace\\stanfordner\\sample.txt"; File filename = new File(pathname); // 要读取以上路径的input。txt文件 String query_id = filename.getName().substring(0,filename.getName().lastIndexOf("."));