Source Code : uses a pair of CharArrayReaders

Java Is Open Source Programming Language You Can Download From Java and Java Libraries From http://www.oracle.com. Click Here to download
We provide this code related to title for you to solve your developing problem easily. Libraries which is import in this program you can download from http://www.oracle.com. Click Here or search from google with Libraries Name you get jar file related it

uses a pair of CharArrayReaders

  

import java.io.CharArrayReader;
import java.io.IOException;

public class CharArrayReaderDemo {
  public static void main(String args[]) throws IOException {
    String tmp = "abcdefghijklmnopqrstuvwxyz";
    int length = tmp.length();
    char c[] = new char[length];

    tmp.getChars(0, length, c, 0);
    CharArrayReader input1 = new CharArrayReader(c);
    CharArrayReader input2 = new CharArrayReader(c, 0, 5);

    int i;
    while ((i = input1.read()) != -1) {
      System.out.print((char) i);
    }

    while ((i = input2.read()) != -1) {
      System.out.print((char) i);
    }
  }
}

   
  

Thank with us