Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

import java.io.BufferedReader;

import java.io.File;

import java.io.FileReader;

public class Main {
    /**
     *
     * @param filename
     */
    public static String readTimestampFromFile(String filename) {
        File file = new File(filename);
        try {
            if (file.exists()) {
                BufferedReader br = new BufferedReader(new FileReader(file));
                return br.readLine();
            }
        } catch (Exception e) {
            return null;
        }

        return null;
    }
}