summaryrefslogtreecommitdiffstats
path: root/Master/Reference Architectures and Patterns/hjp5/examples/Listing1801.java
blob: 8188bec612bb7f8998c837666f1147078d1e5a79 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
/* Listing1801.java */

import java.io.*;

public class Listing1801
{
  public static void main(String[] args)
  {
    String hello = "Hallo JAVA\r\n";
    FileWriter f1;

    try {
      f1 = new FileWriter("hallo.txt");
      f1.write(hello);
      f1.close();
    } catch (IOException e) {
      System.out.println("Fehler beim Erstellen der Datei");
    }
  }
}