I am trying to get a keychaincount and name and put it in an array. I then want to add this array to a temporary file to save the variables for the next time I run the code. I have this code so far:
public static void order_history(){
String[][] newArray = {{name, String.valueOf(keychain_count)}};
try {
FileOutputStream fos = new FileOutputStream("t.tmp");
ObjectOutputStream oos = new ObjectOutputStream(fos);
oos.writeObject(newArray);
oos.close();
} catch (IOException i) {
i.printStackTrace();
}
I basically want to be able to read the file and get all the arrays to parse through them.