Menu
Question Index
...

What will be the output of the following program?

import java.io.*;
public class GuessOutput {
    public static void main(String[] args) throws IOException {
        FileWriter fw = new FileWriter("file.txt");
        BufferedWriter bw = new BufferedWriter(fw);
        bw.write("Hello, This is Merit Campus.");
        bw.close();
        FileReader fr = new FileReader("file.txt");
        BufferedReader br = new BufferedReader(fr);
        br.read();    
        br.skip(6);
        br.reset();
        System.out.println((char)br.read());
        br.close();
    }
}


T
r
C
Some other output
Compilation Error or Runtime Error

Doubts

Problems

Topic: Java BufferedWriter

Read this topic
Take test on this topic

0
Wrong
Score more than 2 points

© meritcampus 2019

All Rights Reserved.

Open In App