Store input characters in an array
I am trying to read characters from Keyboard. And then I have to print a fixed number of characters on each line.
Below is the code I used for inputing the characters. But I am trying to put every character into an array. Can I use
read(char[] cbuf, int offset, int length)
Read characters into a portion of an array.
But I dont know the length. HOw can I make it to work?
class IChar{
publicstaticvoid main(String args[])throws IOException
{
char c;
BufferedReader br =new BufferedReader(newInputStreamReader (System.in));
System.out.println("Enter the characters");
do{
c = (char) br.read();
}while (c !='q');

