Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

import java.io.FileInputStream;
import java.nio.charset.StandardCharsets;
import java.util.Scanner;

public class Main {

    public static void main(String[] args) throws Exception {
        Scanner scanner = new Scanner(new FileInputStream("c:/text.txt"), StandardCharsets.UTF_8.name());
        System.out.println(scanner.nextLine());

        scanner.close();
    }
}