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.FileInputStream;

import java.io.IOException;
import java.io.ObjectInputStream;

public class Main {

    public static Object DeserializeObject(String path) throws ClassNotFoundException, IOException {
        Object o;
        ObjectInputStream ois = new ObjectInputStream(new FileInputStream(new File(path)));
        o = ois.readObject();
        return o;
    }
}