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


Question-10. What does the following Java coding snippet print?<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-10. What does the following Java coding snippet print? 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, 0, 3); int i; try { while ((i io_1.read(O) != -1) { System.out.print((char) i); } } catch (IOException e) { e.printStackTrace(); } } A. abc B. abcd C. abcde D. abcdef

Jun 06, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here