Hi,
I am somewhat new to Java, and i am working on a project at the moment. The program has a 9x9 2D char array. what the it does is take in 2 chars inputted by the user, compares them to where those chars are in the table, and then does a bunch of other stuff once is finds positions of the 2 chars in the grid.
Its working great, except in order to speed things up im considering writing that 2d char array to a binary file and then just looking up the index of the chars i need rather than searching the array.
What would be the method i would use to transfer my char array to a binary file, and then more importantly how would i call it up when i need it? (of course maintaining the integrity of the grid since the locations of the chars are extremely important)
I'm not asking for the entire code, but just some hints, snippets and other things to get me on track. My hours of google searching did not turn up anything useful.
Note: I didnt post my code because its sort of a mess right now as im trying out a lot of methods, and have a bunch of stuff commented out; it would probably end up confusing everyone lol
I am somewhat new to Java, and i am working on a project at the moment. The program has a 9x9 2D char array. what the it does is take in 2 chars inputted by the user, compares them to where those chars are in the table, and then does a bunch of other stuff once is finds positions of the 2 chars in the grid.
Its working great, except in order to speed things up im considering writing that 2d char array to a binary file and then just looking up the index of the chars i need rather than searching the array.
What would be the method i would use to transfer my char array to a binary file, and then more importantly how would i call it up when i need it? (of course maintaining the integrity of the grid since the locations of the chars are extremely important)
I'm not asking for the entire code, but just some hints, snippets and other things to get me on track. My hours of google searching did not turn up anything useful.
Note: I didnt post my code because its sort of a mess right now as im trying out a lot of methods, and have a bunch of stuff commented out; it would probably end up confusing everyone lol