daily pastebin goal
68%
SHARE
TWEET

Untitled

a guest Mar 13th, 2018 66 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /*Dieses Programm speichert die Zahlen von 1 bis 1000 in einer TXT
  2.  *Autor: Marius Deck
  3.  *Umgebung: JDK 1.8, Windows 10
  4.  *Erstellt: 13.03.2018
  5.  *Letzte Änderung: 13.03.2018
  6.  */
  7. import java.util.*;
  8. class Speichertest{
  9.   public static void main(String args[])  {
  10.     Scanner in = new Scanner(System.in);
  11.     File windowsDatei = new File("C:\\test.txt");
  12.     for (int i=0;i<10000;i++) {
  13.       /*BufferedWriter writer= new BufferedWriter(new FileWriter(D:\OD\OneDrive\Documents\Schule\+TGE-I\Software\Programme\Versuche\Speichertest\test.txt));
  14.        *writer.write(i);
  15.        *writer.newLine(); */
  16.       try (BufferedWriter writer= new BufferedWriter(new FileWriter("C:\\text.txt"))) {
  17.         for (String zeile: zeilen) {
  18.           writer.write(zeile);
  19.           write.newLine();
  20.         }
  21.       }
  22.     }
  23.     writer.close();
  24.   }
  25. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top