Files
Story-With-Thanh/HELLOFILE - HELLO FILE.java
2022-12-15 23:51:04 +07:00

19 lines
451 B
Java

import java.io.File;
import java.io.FileNotFoundException;
import java.util.Scanner;
public class Main{
public static void main(String[] args){
File file = new File("Hello.txt");
try{
Scanner scaner = new Scanner(file);
while(scaner.hasNextLine()){
System.out.println(scaner.nextLine());
}
scaner.close();
}catch(FileNotFoundException e){
}
}
}