I am making a program that opens and reads a file. This is my code:
import java.io.*; public class FileRead{ public static void main(String[] args){
You need to give the absolute pathname to where the file exists.
File file = new File("C:\\Users\\User\\Documents\\Workspace\\FileRead\\hello.txt");