Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

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

public class Main {
    public static boolean restoreFromBackup(File f) {
        File backup = new File(f.getAbsolutePath() + ".good.bak.2");
        if (f.exists())
            f.delete();
        if (backup.exists()) {
            if (backup.renameTo(f))
                return true;
        }
        return false;
    }
}