title: Adding a ";" after each piece of data in Arraylist
body: <p>I wrote a program to make my text file data like <code>CSV</code> format.</p>
  <pre class="lang-java prettyprint-override"><code>static String originalFileContent = &quot;&quot;;
  
  static BufferedReader reader; 
  
  static BufferedWriter writer;
  
  
  public static void main(String[] args)   {
          
          String input = args[1];
          String output = args[2];
      
          for(int i = 0; i&lt;args.length; i++) {
             System.out.println(&quot;args[&quot; + i + &quot;]: &quot; + args[i]);
          }
          
          try {
              readInput(input);
          } catch (IOException e) {
              
              e.printStackTrace();
          }
          try {
              createLogic();
          } catch (Exception e1) {
              
              e1.printStackTrace();
          }
          try {
              writeOutput(output);
          } catch (IOException e) {
              
              e.printStackTrace();
          }
          
                  
  }
      
  public static void readInput(String input) throws IOException {
          
          reader = new BufferedReader(new FileReader(input));
          
          String currentReadingLine;
          currentReadingLine = reader.readLine();
          
          while (currentReadingLine != null) {
              
              originalFileContent += currentReadingLine; //-
              currentReadingLine = reader.readLine();   
                //String
          }
  }
      
  public static void createLogic() throws Exception  {
              
              BufferedReader in = new BufferedReader(new FileReader(&quot;input.txt&quot;));
              String str = &quot;;&quot;;
  
              ArrayList&lt;String&gt; list = new ArrayList&lt;String&gt;();
              while((str = in.readLine()) != null){
                  list.add(str);
              }
              String format = &quot;Name; Strasse; Ort&quot; + System.lineSeparator();
              originalFileContent = format;
              int a = 1;
              for(String textString: list) {
                  originalFileContent += textString;
                  
                  if(a%4 == 0) {
                   originalFileContent += System.lineSeparator();
                  }
                  a++;
              }
              list.add(&quot;;&quot;);
  }
      
  public static void writeOutput(String output) throws IOException {
          
          writer = new BufferedWriter(new FileWriter(output));
          writer.write(originalFileContent);
          writer.close();
          
  }
  </code></pre>
  <p>I got the Output:</p>
  <blockquote>
  <p>Name; Strasse; Ort</p>
  <p>Max Amillion. 1234 South</p>
  <p>John Doe. 4321 West</p>
  <p>Mary Poppins. 101 Park</p>
  <p>Acme Manufacturing Co. 9001 Main</p>
  </blockquote>
  <p>but I would like to have a <code>;</code> in between each piece of data anybody now how to make this possible ?</p>