import java.util.*;
import java.io.*;
class checkedException{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
try{
File f = new File(sc.nextLine());
BufferedReader br = new BufferedReader(new FileReader(f));
String s;
while((s=br.readLine())!=null){
System.out.println(s);
}
}
catch(Exception e){
System.out.println("Error reading file");
}
}
}
To embed this project on your website, copy the following code and paste it into your website's HTML: