There are some examples of sudoku solvers on the net.
Maybe we should get this straight first: you are trying to create something that generates a random sudoku puzzle and then solves it?
create the puzzle in a text file, easy and simple for when you are starting out. Put each new row on a new line and each number separated by a space or something that is the way I used to do sudoku-related Java stuff because that way it is easy for anyone to read and understand. Or if you don't need to produce a tangible result that you can look at forever just have it do it in memory and print the results out then you don't even need to handle files.