stream - Read field of chars from BufferReader in Java -


how read 1 line of chars in field of chars in java?

private char[] w; int i=0;  bufferedreader br = new bufferedreader(new filereader("pathtofile..."));  char c = '-1';  while (c!='\n') {     w[i++] = (char) br.read(); } 

i got java.lang.nullpointerexception

i use arraylist here.

private list<character> list = new arraylist<character>();  int i=0;  bufferedreader br = new bufferedreader(new filereader("pathtofile..."));  char c = '-1';  while (c!='\n') {     list.add((char) br.read()); } 

something that.


Comments

Popular posts from this blog

how to proxy from https to http with lighttpd -

android - Automated my builds -

python - Flask migration error -