public static void main(String[] args){
FileWriter fw = null;
try {
fw = new FileWriter("IO1\\a",true);
} catch (IOException e) {
System.out.println(e);
}finally {
if(fw != null){
try {
fw.close();
} catch (IOException e) {
System.out.println(e);
}
}
}
}