Question: Ive done part 1 just need help with part 2 . heres my code for part 1 to use for part 2 package rancreate; import

Ive done part 1 just need help with part 2.
heres my code for part 1 to use for part 2
package rancreate;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.Scanner;
import java.util.Random;
/**
*
* @author Erik
*/
public class Rancreate {
public static void main(String[] args) throws IOException
{
String filename; // File name
int number; // Friend's name
// Create a Scanner object for keyboard input.
Scanner keyboard = new Scanner(System.in);
// Get the filename.
System.out.print("Enter the filename: ");
filename = keyboard.nextLine();
Random randomNumbers = new Random();
//number = randomNumbers.nextInt();
// Open the file.
PrintWriter outputFile = new PrintWriter(filename);
// Get data and write it to the file.
for (int i =1; i =100; i++)
{
// Get the name of a friend.
System.out.println(number = randomNumbers.nextInt(100));
// Write the name to the file.
outputFile.println(number);
}
// Close the file.
outputFile.close();
}
}
 Ive done part 1 just need help with part 2. heres

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!