I/O
I have already made a program that would generate 100 random numbers between 1 and 6. I made the program save the 100 random numbers to a txt. file. I had to make another program which would open the txt. file and then the program had to say how many times each number was rolled. Here's where I am in the second program which opens the txt. file:
import java.io.*;
public class TimesRolled
{
public static void main (String [] args) throws IOException
{
BufferedReader readFile = new BufferedReader (new FileReader("randomnumbers.txt"));
int number [] = new int [100];
for (int i = 0 ; i<6 ; i++)
{
number = Integer.parseInt(readFile.readLine());
}
}
}

