Attachment 'Scrittura.java'
Download 1 package fondamenti.files;
2
3 import java.io.FileWriter;
4 import java.io.IOException;
5 import java.io.PrintWriter;
6
7 public class Scrittura {
8
9 public static void main(String[] args) {
10
11 try {
12 //Sostituire con un percorso valido sul proprio pc
13 FileWriter f = new FileWriter("/Users/ricca/Universit�/Didattica/Corsi/FondamentiSciBio/fondamenti/src/prova2.txt");
14
15 PrintWriter p = new PrintWriter(f);
16
17 p.println("ciccio");
18
19 p.close();
20
21 } catch (IOException e) {
22 System.out.println("C'� stato un errore di I/O");
23 }
24
25 }
26
27 }
Attached Files
You are not allowed to attach a file to this page.