Question: Supposedly the user will enter their "ID #: 1203103" then after that it will automatically create a text file named 1203103.txt How can I do that? Here is my code. what will I change in my code?

```
String id = scan.nextLine();
File file = new File(id.txt);
FileWriter fileWrite = new FileWriter(file);
BufferedWriter bufferedWriter = new BufferedWriter(fileWrite);

```

Answer: 
You should also surround the creation of the file with a try and catch block, and when you're done with the file close it like so:

```
    Scanner scan = new Scanner(System.in);
    String id = scan.nextLine();
    File file = new File(id + ".txt");
    FileWriter fileWrite = null;
    BufferedWriter bufferedWriter = null;
    try {
        fileWrite = new FileWriter(file);
        bufferedWriter = new BufferedWriter(fileWrite);
    } catch (IOException e) {
        e.printStackTrace();
    } finally {
        try {
            scan.close();
            fileWrite.close();
            bufferedWriter.close();
        } catch (IOException e) {
            e.printStackTrace();
        }
    }

```
You need to create a `String` for the file name with the expected format. To do this, you can simply use the `+` operator which concatenates `String`s (and automatically converts non-Strings to Strings):

```
String filename = id + ".txt";

```