Question-11. What will be the output of following Java coding snippet? import java.io.CharArrayReader; import java.io.IOException; class TestApp { public static void main(String[] args) { String obj =...


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

Extracted text: Question-11. What will be the output of following Java coding snippet? 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_2.read()) != -1) { System.out.print((char) i); } } catch (IOException { 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