Your current code is passing your System.in scanner to your Sudoku constructor. You need to create a new scanner for your input file and that is the one you want to pass to your constructor.
Ezzaral
Posting Genius
15,986 posts since May 2007
Reputation Points: 3,250
Solved Threads: 847
Once you get that part working, you have a bit of work to do on the logic of your loops to populate the puzzle array.
Ezzaral
Posting Genius
15,986 posts since May 2007
Reputation Points: 3,250
Solved Threads: 847
It's actually relative to whatever your projects "current working directory" is, which I am not sure what that is by default in Eclipse. You could try placing a copy of that file in your project's root directory (not the src directory). Or you could just specify the full path to the file.
Ezzaral
Posting Genius
15,986 posts since May 2007
Reputation Points: 3,250
Solved Threads: 847
I'm think you can set the working directory through the project properties in Eclipse, but I don't have it here to look myself. I would think the root working directory would be "Desktop/CS Programs/CS 2410/CS 2420" but that may not be the case.
Ezzaral
Posting Genius
15,986 posts since May 2007
Reputation Points: 3,250
Solved Threads: 847
You just need to terminate the line of output after each row with System.out.println(); .
Ezzaral
Posting Genius
15,986 posts since May 2007
Reputation Points: 3,250
Solved Threads: 847
Do not hijack old threads merely to post "give me teh codez". If you have a question about an assignment, start a new thread and post the code that you have as a start.
Ezzaral
Posting Genius
15,986 posts since May 2007
Reputation Points: 3,250
Solved Threads: 847
Read this:
Do not hijack old threads merely to post "give me teh codez". If you have a question about an assignment, start a new thread and post the code that you have as a start.
javaAddict
Nearly a Senior Poster
3,329 posts since Dec 2007
Reputation Points: 1,014
Solved Threads: 448