简单的字数统计

 java.io.*;
 java.util.*;
 java.text.*;







  wc {
   main(String[] args) {
 nl = 0, nw = 0, nc = 0;

 {
[] buff =  [4096];
 inword = ;
 length;

 ((length = System.in.read(buff)) != -1) {
nc += length;
( i = 0; i < length; i++) {
 c = ()buff[i];
 (c == '\n')
++nl;
 (Character.isWhitespace(c))
inword = ;
  (inword == ) {
++nw;
inword = ;
}
}
}
}  (IOException e) {
System.err.println(e);
;
}
System.out.println(Integer.toString(nl) + " " +
Integer.toString(nw) + " " +
Integer.toString(nc));
}
}

你可能感兴趣的:(简单的字数统计)