📄 main.java
字号:
package cn.edu.nju.software.puzzle;
import java.io.File;
import java.io.IOException;
import java.util.Set;
public class Main {
public static void main(String[] args) throws IOException {
File squareFile = new File("square.txt");
File dictFile = new File("dict.txt");
if (squareFile.exists() && dictFile.exists()) {
WordPuzzle puzzle = new WordPuzzle(squareFile, dictFile);
Set<String> words = puzzle.find();
if (words != null) {
for (String word : words) {
System.out.println(word);
}
}
else {
System.out.println("No word found!");
}
} else{
System.err.println("Input file missing!");
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -