At the moment I have this:
try{
// Create file
FileWriter fstream = new FileWriter("output");
BufferedWriter out = new BufferedWriter(fstream);
Iterator mapIt = assignments.entrySet().iterator();
while (mapIt.hasNext()){
out.write(mapIt.next().toString()+";\n");
}
//Close the output stream
out.close();
}
The thing is, I can't just take the toString() of iterator, I need to take out the key and the value separately so I can put some stuff between them in the outputfile. Does anyone know how I do this?