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((char)q); } } } } }

A. interview
B. interview Mania
C. Maniainterview
D. interview Mania
E. None of these
Answer» E. None of these


Discussion

No Comment Found

Related MCQs