Line 1. BufferedWriter b1 = new BufferedWriter(new File("f"));
Line 2. BufferedWriter b2 = new BufferedWriter(new FileWriter("f1"));
Line 3. BufferedWriter b3 = new BufferedWriter(new PrintWriter("f2"));
Line 4. BufferedWriter b4 = new BufferedWriter(new BufferedWriter(bufferWriter));

What is the result?

Options
- Compilation succeds.
- Compilation fails due to error on line line 2
- Compilation fails due to error on line line 1
- Compilation fails due to error on line line 4


CORRECT ANSWER : Compilation fails due to error on line line 1

Write your comments

 
   
 
 

Enter the code shown above:
 
(Note: If you cannot read the numbers in the above image, reload the page to generate a new one.)


Advertisement