Question: For Java Programing, 1. Name at least five different file categories. 2. What kind of data may be stored in a file? 3. What are

For Java Programing,

1. Name at least five different file categories.

2. What kind of data may be stored in a file?

3. What are at least four methods associated with file processing (using JAVA of course)?

4) Execute the following code to read a file.

import java.io.*;

public class ReadFile {

public static BufferedReader buffer;

public static void main(String[] args)

{

try {

// create a FileReader object

FileReader file = new FileReader("Frost.txt");

// create a BufferedReader object to read the file

BufferedReader buffer = new BufferedReader(file);

String line ="";

while((line=buffer.readLine()) !=null)

{

System.out.println(line);

}

//close the BufferedReader Object

buffer.close();

}

catch (IOException e)

{

System.out.println("A read error has occurred");

}

}

}

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!