📄 main.java
字号:
package ex3_intersection;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.FileWriter;
import java.io.IOException;
public class main {
/**
* @param args
* @throws IOException
*/
public static void main(String[] args) throws IOException {
Intersection i=new Intersection();
try {
FileInputStream fr=new FileInputStream("data_ex3_intersection\\data3.txt");
i.Intersect(fr);
} catch (FileNotFoundException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
FileWriter fw=new FileWriter("data_ex3_intersection\\result3.txt");
fw.write(Integer.toString(i.total_num)+'\n');
fw.flush();
for(int k=0;k<i.al.size();k++)
{
cord temp=(cord) i.al.get(k);
fw.write(temp.x+","+temp.y+'\n');
fw.flush();
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -