Advertisement
Guest User

Untitled

a guest
Sep 21st, 2017
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.41 KB | None | 0 0
  1. import java.io.FileNotFoundException;
  2. import java.io.*;
  3. import java.util.*;
  4.  
  5. public class Salva {
  6.     public static void main (String[]args) throws FileNotFoundException, IOException{
  7.         LinkedList<String> ll=new LinkedList();
  8.         ll.add("ciao");
  9.         ll.add("a");
  10.         ll.add("tutti");
  11.         ObjectOutputStream oos=new ObjectOutputStream(new FileOutputStream("XXX"));
  12.         oos.writeObject(ll);
  13.         oos.close();
  14.     }
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement