What should be placed insted of ... in order to read the content of the C:\file.txt file and print it out on the screen? Select all that will work

public class Main {
    public static void main(String[] args) {
        File file = new File("C:\\file.txt");
        try {
            ...
            int i;
            while((i = input.read()) != -1){
                System.out.print((char)i);
            }
        }
        catch (Exception ex) {
            System.out.println("Exception");
        }
    }
}

Follow CodeGalaxy

Mobile Beta

Get it on Google Play
Send Feedback