MCQOPTIONS
Saved Bookmarks
| 1. |
What is the output of this program?import java.io.*; public class filesinputoutput_Example { public static void main(String[] args) { String object = "interview mania"; byte p[] = object.getBytes(); ByteArrayInputStream object1 = new ByteArrayInputStream(p); for (int K = 0; K < 2; ++K) { int q; while ((q = object1.read()) != -1) { if (K == 0) { System.out.print(Character.toUpperCase((char)q)); } } } } } |
| A. | interview mania |
| B. | MANIA |
| C. | INTERVIEW |
| D. | INTERVIEW MANIA |
| E. | None of these |
| Answer» E. None of these | |