⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 main.java

📁 在一个n*n 矩阵中找到 沿着八个方向搜索
💻 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 + -