Question-12. What would the following Java coding snippet return? import java.io.CharArrayReader; import java.io.IOException; class TestApp { public static void main(String[] args) { String obj =...


Question-12. What would the following Java coding snippet return?<br>import java.io.CharArrayReader;<br>import java.io.IOException;<br>class TestApp {<br>public static void main(String[] args) {<br>String obj =

Extracted text: Question-12. What would the following Java coding snippet return? import java.io.CharArrayReader; import java.io.IOException; class TestApp { public static void main(String[] args) { String obj = "abcdef"; int length obj.length(); char c[] = new char[length]; obj.getChars(0, length, c, 0); CharArrayReader io_1 new CharArrayReader(c); CharArrayReader io_2 new CharArrayReader (c, 1, 4); int i, j; try { while ((i io_1.read()) (j io_2.read() )) { == %3D System.out.print((char) i); } } catch (IOException e) { e.printStackTrace(); } A. abc B. abcd C. abcde D. abcdef E. Nothing would get printed.

Jun 06, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here