Question: I need to make some changes to Qt 4.7.1, so I need to add it to my subversion server to track my changes. However, once it's added, the configure script fails. I'm guessing it's choking on the .svn files. 

I'm using Windows. Is there any way to add Qt to subversion, delete all the .svn folders, configure and build it, recreate the .svn folders, and then submit my changes?

Or is there any other work around? The error I get is 'Couldn't update default mkspec'

Answer: 
If `a` is an array of strings,

```
for (String s : a)
     outputFile.println(s);

```

will print the array line-by-line to `outputFile`.
I might write it more like this: 

```
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.PrintStream;

/**
 * FileDemo
 * @author Michael
 * @since 2/26/11
 */
public class FileDemo
{
    public static void main(String[] args)
    {
        try
        {
            FileDemo fd = new FileDemo();
            fd.save("out/test.txt", args);
        }
        catch (FileNotFoundException e)
        {
            e.printStackTrace();
        }

    }

    public void save(String filePath, String [] lines) throws FileNotFoundException
    {
        PrintStream ps = null;

        try
        {
            ps = new PrintStream(new FileOutputStream(filePath));
            int lineNum = 1;
            for (String line : lines)
            {
                ps.printf("%5d %s\n", lineNum++, line);
            }
        }
        finally
        {
            close(ps);
        }
    }

    public static void close(PrintStream ps)
    {
        if (ps != null)
        {
            ps.flush();
            ps.close();
        }
    }
}

```

I didn't see any actual content in your code, so I added some. I didn't how a file with line numbers was very interesting. You'd be able to modify this to make it differently if you wish.