J'ai essayé d'écrire un tableau dans un fichier. Je sais comment écrire des entiers ou des chaînes dans un fichier mais apporter un tableau me perturbe. Je me sers de ce moment:comment écrire un tableau dans un fichier Java
public static void write (String file, int[]x) throws IOException{
BufferedWriter outputWriter = null;
outputWriter = new BufferedWriter(new FileWriter(filename));
outputWriter.write("hi");// Here I know i cant just write x[0] or anything. Do i need
//to loop in order to write the array?
outputWriter.newLine();
outputWriter.flush();
outputWriter.close();
}
que vous aurez à boucle sur l'arry imprimant chaque élément – NimChimpsky
Atleast google une fois ... – Parth
Voulez-vous que le résultat soit lisible par des humains ou par d'autres programmes? –