Answers for "how to write an object to a file with an arraylist in java"

0

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();
}
Posted by: Guest on June-06-2020

Code answers related to "how to write an object to a file with an arraylist in java"

Code answers related to "TypeScript"

Browse Popular Code Answers by Language