Write a Java method that returns a String representing a file name entered by the user.

Use the
BufferedReader class to obtain input.


```
public static String getFileName() throws IOException
{
BufferedReader stdin = new BufferedReader(new
InputStreamReader(System.in));
System.out.print("Enter the name of the file to open: ");
String fileName = stdin.readLine();
return fileName.trim();
}

```

Computer Science & Information Technology

You might also like to view...

A factor that obstructs with a message between the sender and the recipient is called ________

A) blockage B) feedback C) noise D) breakdown

Computer Science & Information Technology

Recent searches only search the currently displayed location.?

Answer the following statement true (T) or false (F)

Computer Science & Information Technology

The Information Browser provides access to all information not directly related to actual data in the database.

Answer the following statement true (T) or false (F)

Computer Science & Information Technology

The XML _____ signals to the program reading the file that the document is written in XML.

A. ?statement B. ?declaration C. ?index D. ?link

Computer Science & Information Technology