Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

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

public class Main {
    public static String read(String s) throws IOException {
        String s1;
        RandomAccessFile randomaccessfile;
        s1 = "";
        randomaccessfile = null;
        File file = new File(s);
        randomaccessfile = new RandomAccessFile(file, "r");
        s1 = randomaccessfile.readLine();
        randomaccessfile.close();
        return s1;
    }
}