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

  • (A) Error
  • (B) True
  • (C) Exception
  • (D) False
πŸ’¬ Discuss
βœ… Correct Answer: (D) False
Explanation: The output for the above code snippet is false as it is a writer and not a Reader.
Explanation by: Mr. Dubey
The output for the above code snippet is false as it is a writer and not a Reader.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
139
Total Visits
πŸ“½οΈ
2 y ago
Published
πŸŽ–οΈ
Mr. Dubey
Publisher
πŸ“ˆ
91%
Success Rate