I have txt file all separated by a space, I know how to read in the file, but I don't know how to place the data into the array
this is the code :
public static void main(String[] args) throws IOException
{
ArrayList<String> list=new ArrayList<>();
try{
File f = new File("C:\\Users\\Dash\\Desktop\\itemsset.txt");
FileReader fr = new FileReader(f);
BufferedReader br = new BufferedReader(fr);
String line = br.readLine();
String array[][] = null ;
try {
while ((line = br.readLine()) != null) {
}
br.close();
fr.close();
}
catch (IOException exception) {
System.out.println("Erreur lors de la lecture :"+exception.getMessage());
}
}
catch (FileNotFoundException exception){
System.out.println("Le fichier n'a pas été trouvé");
}
}
Description below :