[問題] 不能執行..
可以編譯
但是執行時出現"目前檔案中沒有一個類別程式包含有main"
可是裡面明明就有main..
請問如何解決呢?
擷取main部分
public static void main(String[] args)
{
String datafile = "sudoku.txt";
if (args.length > 1) {
datafile = args[0];
}
System.out.println("Read puzzle file:" + datafile);
ReadPuzzle(datafile);
PrintPuzzle();
// Solve the puzzle
long starttime = System.currentTimeMillis();
SolvePuzzle();
long endtime = System.currentTimeMillis();
System.out.println("\nSolve puzzle in " + (endtime - starttime) +
" microseconds.");
PrintPuzzle();
boolean success = CheckRule();
if (success) {
System.out.println("Good Job!");
}
else {
System.out.println("Oops! test failed, try again.");
}
}
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 61.223.163.126
推
05/31 08:29, , 1F
05/31 08:29, 1F
推
05/31 20:28, , 2F
05/31 20:28, 2F
→
05/31 21:42, , 3F
05/31 21:42, 3F
→
05/31 23:20, , 4F
05/31 23:20, 4F
→
05/31 23:22, , 5F
05/31 23:22, 5F
推
06/01 00:17, , 6F
06/01 00:17, 6F
→
06/01 00:19, , 7F
06/01 00:19, 7F