BufferedWriter not Printing properly?
<p>I'm making a program that creates a log of grades in a specified number of classes and writes this data to a text file. It writes the date, class names, grades (or at least it should), and a closing statement. For some reason I can't figure out, my program only prints out the date and class name. Any ideas?</p>

<p>Here's the code:</p>

<pre><code>        BufferedWriter data = null; //Writes Output

    try {

        File log = new File ("Grade.txt"); //Name of File
        FileWriter fileWriter = new FileWriter (log, true); //Appends File
        data = new BufferedWriter (fileWriter); //Creates BufferedWriter
        Date date = new Date (); //Sets Date

               //Code here makes an array of class names 

            System.out.print ("Enter Assignment Name:  ");
                title = reader.nextLine ();
                data.write (title);
                data.newLine (); //Blank Line
                reader.nextLine (); //Consume Input
                System.out.print ("Enter Points Possible:  ");
                temp = reader.nextInt();

                if (temp &lt; 0){

                    throw new ArithmeticException ("");

                }else{

                    poss += temp;
                    data.write(poss);

                }//Close If

                System.out.print ("Enter Points Earned");
                temp = reader.nextInt();

                if (temp &lt; 0){

                    throw new ArithmeticException ("");

                }else{

                    earn += temp;
                    data.write(earn);

                }//Close If
</code></pre>
