I have a list l2 and I want to write the list elements to the file. I'm doing this:
val fw = new FileWriter("src/results.txt", true) ;
for( k <- 1 to l2.length) {
println(l2(i))
fw.write(l2(i))
i+=1
}
fw.close()
But, it does not write anything. Why is that ?