MCQOPTIONS
Saved Bookmarks
| 1. |
What is the output of this program?import java.io.*; public class Chararrayinput_Example { public static void main(String[] args) { String object = "InterviewMania"; int len = object.length(); char ch[] = new char[len]; object.getChars(0, len, ch, 0); CharArrayReader chararray = new CharArrayReader(ch); CharArrayReader chararray0 = new CharArrayReader(ch, 0, 9); int i; try { while((i = chararray0.read()) != -1) { System.out.print((char)i); } } catch (IOException e) { e.printStackTrace(); } } } |
| A. | Interview |
| B. | Mania |
| C. | InterviwMania |
| D. | Runtime Error |
| E. | Compilation Error |
| Answer» B. Mania | |