Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

int [][] matrix = new int [9][9]; Scanner sc = new Scanner(System.in); System.out.print(Enter file name ); String fileName = sc.next(); Scanner input = new Scanner

int [][] matrix = new int [9][9]; Scanner sc = new Scanner(System.in); System.out.print("Enter file name "); String fileName = sc.next(); Scanner input = new Scanner (fileName); while (input.hasNext()){ for (int col = 0; col < 9 ; col ++){ for (int row = 0; row < 9 ; col ++){ sudoku [col][row] = input.nextInt(); System.out.println(matrix [col][row]); } } }

}

i got error this

Exception in thread "main" java.util.InputMismatchException

at java.util.Scanner.throwFor(Scanner.java:864)

at java.util.Scanner.next(Scanner.java:1485)

at java.util.Scanner.nextInt(Scanner.java:2117)

at java.util.Scanner.nextInt(Scanner.java:2076)

at Sudoku.main(matrix.java:30)

----jGRASP wedge2: exit code for process is 1.

----jGRASP: operation complete.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Systems For Advanced Applications 18th International Conference Dasfaa 2013 Wuhan China April 22 25 2013 Proceedings Part 2 Lncs 7826

Authors: Weiyi Meng ,Ling Feng ,Stephane Bressan ,Werner Winiwarter ,Wei Song

2013th Edition

3642374492, 978-3642374494

More Books

Students also viewed these Databases questions

Question

Decision Making in Groups Leadership in Meetings

Answered: 1 week ago