Register Now

Login

Lost Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

What will be the output of the following JavaScript code?
var f = new java.io.File(“/tmp/test”);
var out = new java.io.FileWriter(f);
out instanceof java.io.Reader

What will be the output of the following JavaScript code?
var f = new java.io.File(“/tmp/test”);
var out = new java.io.FileWriter(f);
out instanceof java.io.Reader
a) error
b) true
c) exception
d) false

Answer: d
Explanation: The output for the above code snippet is false as it is a writer and not a Reader.

Join The Discussion