title: how to convert arraylist to string array with all items in double quote
body: <p>In my application i m getting a problem..
  i am getting data from server into ArrayList. but i am unable to convert that list in to a String array in which all data items are in double quoted.</p>
  
  <p>my code for getting arrayList is</p>
  
  <pre><code>public ArrayList&lt;String&gt; dataarea1(){   
  
          ArrayList&lt;String&gt;dataarea1=new ArrayList&lt;String&gt;();
          try{
          Statement smt=mycon.connection().createStatement();
          rs=smt.executeQuery("DCRAREADDL "+ paid +",'','','',''");
  
          while(rs.next())
          {
              dataarea1.add(rs.getString("AREA"));
          }
          }catch(Exception e){
              e.printStackTrace();
          }
          return dataarea1;
      }
  </code></pre>
  
  <p>now i want to convert my ArrayList dataarea1 to a StringArray like this..</p>
  
  <pre><code>String[] colours = { "Red", "Green", "Blue", "Yellow", "Orange", "Purple" };
  </code></pre>
  
  <p>i want to convert my arraylist in this form but now it is converting in single quoted only....
  if some one can tell me how to convert arraylist in Stringarray with all data item in double qoute</p>
  
  <p>now i m using this code fro getting string array</p>
  
  <pre><code>public String GetName()
       {
           String colour = "";
              for (int i = 0; i &lt; dataarea3.size(); i++) {
                  colour += ""+ dataarea3.get(i).toString() +"'"+ ",";
  
              }
              return colour;
       }   
  </code></pre>
  
  <p>but here all items are placed in single quote........how i can put them in double quote</p>