1.

StringReader handles _____________________(a) Any character stream(b) A character stream whose source is an array(c) A character stream whose source is character array(d) A character stream whose source is String onlyI had been asked this question in an interview.My doubt is from IO Class topic in section Inbuilt Classes of Object Oriented Programming

Answer»

Right ANSWER is (d) A character stream whose source is STRING only

Explanation: The StringReader can only WORK with the string type data. Even if a character array is given, it MIGHT produce some errors in code. Hence only the string values can be handled properly.



Discussion

No Comment Found

Related InterviewSolutions