Last active
December 11, 2015 03:59
-
-
Save arn-e/4542013 to your computer and use it in GitHub Desktop.
unhandled checked exception java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.io.*; | |
import java.nio.charset.Charset; | |
import java.nio.file.Files; | |
import java.util.List; | |
import java.nio.file.Paths; | |
public class FileReaderTest { | |
public static void main(String[] args) { | |
String filename = "./public/index.html"; | |
List<String> allLines = Files.readAllLines(Paths.get(filename), Charset.defaultCharset()); | |
for ( String i : allLines ) { | |
System.out.println(i); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment