hi, i have been looking at this code way to long! i have been playing with the return statement and i don't know what the problem is. i just want it to print the entire 9 by 9 text file that it reads. take a look at it thanks in advance! i will also attach an example of the type of copy of data or txt file it reads...
import java.util.*; import java.io.*; import javax.swing.JOptionPane; public class SudokuSolverXXX{ public static void main (String [] args){ String input = JOptionPane.showInputDialog("Enter the file path: "); String file_Name = new String(input); //String("input"); int [][] s = new int[9][9]; try{ File q = new File(file_Name); Scanner fin = new Scanner(q); for(int r = 0; r < s.length; ++r){ for(int c = 0; c < s[r].length; ++c){ s[r][c] = fin.nextInt(); } System.out.println(r); } } //System.out.println (s); catch (IOException e) { System.out.println( "The file path or name: "+input+", was not found! " ); } } }