title: groovy.lang.MissingMethodException: No signature of method: java.io.FileWriter.append()
body: <p>Please help me to correct the error.</p>
  
  <p>Output will be the file <code>invoicedetails.csv</code>, consists of all item details in csv format .</p>
  
  <p>invoicedetails.csv</p>
  
  <pre><code>Computer,25000.0,2
  Laptop,65000.0,1
  Printer,8000.0,4 
  </code></pre>
  
  <p>Error observed:</p>
  
  <blockquote>
    <p>groovy.lang.MissingMethodException: No signature of method: java.io.FileWriter.append() is applicable for argument types: (java.lang.Double) values: [6.0]<br>
    Possible solutions: append(char), append(java.lang.CharSequence), append(java.lang.CharSequence, int, int), find(), any(), grep()</p>
  </blockquote>
  
  <p>Program:</p>
  
  <pre><code>import java.io.FileWriter
  class Main{
  
      static void main(String[] args)
      {
  
          BufferedReader br = new BufferedReader(new InputStreamReader(System.in))
          println "Enter the number of items:"
          int n = Integer.parseInt(br.readLine())
          String[] item =new String[n]
          Double[] price =new Double[n]
          int[] quantity = new int[n]
  
          for(int i=0; i&lt;n;i++)
          {
              int it = i+1
              println "Enter item $it details: "
              item[i] = br.readLine()
              price[i] = Double.parseDouble(br.readLine()).round(2)
              quantity[i] = Integer.parseInt(br.readLine())
          }
  
          String COMMA_DELIMITER = ","
          String NEW_LINE_SEPARATOR = "\n"
  
          try
          {
              FileWriter fileWriter = new FileWriter("invoicedetails.csv")
  
              for(int j=0; j&lt;n;j++)
              {
                  fileWriter.append(item[j])
                  fileWriter.append(COMMA_DELIMITER)
                  fileWriter.append(price[j])
                  fileWriter.append(COMMA_DELIMITER)
                  fileWriter.append(quantity[j])
                  fileWriter.append(NEW_LINE_SEPARATOR)   
              }
          }
          catch(Exception e)
          {
              println e
          } 
      }
  }
  </code></pre>