Home / CSE / Javascript - CS :: Discussion

Discussion :: Javascript - CS

  1. 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?

  2. A.

     Error

    B.

     True

    C.

     Exception

    D.

     False

    View Answer

    Workspace

    Answer : Option D

    Explanation :

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


Be The First To Comment