Printing All Values via File Writer
<p>I want to print all the letter that the user will input but the thing is, my program only prints the last value that the user will input, and only the last value is recorded in <code>Ascii.txt</code>. It should look like this</p>

<p>for example : the user input A,B,c,C</p>

<p>I want also to delete the comma but I can't :(</p>

<p>output in "Ascii.txt" should be:</p>

<pre><code>A = 65
B = 66
c = 99
C = 67
</code></pre>

<p>please dont laugh at me because im still a student and new to programming, thank you very much</p>

<pre><code>import java.io.*;

public class NewClass2{
  public static void main(String args[]) throws IOException{



  BufferedReader buff = new BufferedReader(new InputStreamReader(System.in));

  System.out.println("Please Enter  letters separated by comma: ");

  String str = buff.readLine();
  for ( int i = 0; i &lt; str.length(); ++i )
  {
    char c = str.charAt(i);
    int j = (int) c;
    System.out.println(c +" = " + j);
    {
      try
      {
         FileWriter fstream = new FileWriter("Ascii.txt");
         BufferedWriter out = new BufferedWriter(fstream);

         out.write(c+"  =  "+j);
         out.close();

       }catch (Exception e){
       }
     }
    }
  }
  }
</code></pre>
