Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
import java.io.File;

import java.io.FileOutputStream;
import java.io.IOException;

import java.io.ObjectOutputStream;

public class Main {

    public static void SerializeObject(Object object, String path) throws IOException {
        ObjectOutputStream oo = new ObjectOutputStream(new FileOutputStream(new File(path)));
        oo.writeObject(object);
        oo.close();
    }
}