fork download
  1. import java.io.*;
  2.  
  3. class Co {
  4. public static void main(String args[]) throws IOException {
  5. byte[] b = new byte[10];
  6.  
  7. System.out.print("Enter input: ");
  8. int bytesRead = in.read(b);
  9.  
  10.  
  11. for (int i = 0; i < bytesRead; i++) {
  12. System.out.print((char) b[i]);
  13. }
  14. }
  15. }
  16.  
Success #stdin #stdout 0.07s 54704KB
stdin
abcdefghijk
stdout
Enter input: abcdefghij