Consider the following code snippet
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 for the above code snippet?
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: Option D
Solution(By Examveda Team)
The output for the above code snippet is false as it is a writer and not a Reader.Related Questions on Server Side and Client Side Scripting
What are the events generated by the Node objects called?
A. generators
B. emitters
C. dispatchers
D. highevents
What is the function used to deregister event handler ‘f’?
A. deleteAllListeners(name)
B. deleteListener(name,f)
C. removerListener(name,f)
D. removeAllListeners(name)
What is the function used to remove all handlers for name events?
A. deleteAllListeners(name)
B. deleteListener(name,f)
C. removerListener(name,f)
D. removeAllListeners(name)
Join The Discussion