Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR TYPESCRIPT

java write arraylist of objects to file

try {
    FileOutputStream fos = new FileOutputStream("output");
    ObjectOutputStream oos = new ObjectOutputStream(fos);   
    oos.writeObject(MenuArray); // write MenuArray to ObjectOutputStream
    oos.close(); 
} catch(Exception ex) {
    ex.printStackTrace();
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #java #write #arraylist #objects #file
ADD COMMENT
Topic
Name
3+4 =