Advertisement
jbn6972

byteio

Nov 9th, 2021
142
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.41 KB | None | 0 0
  1. // import java.util.*;
  2. import java.io.*;
  3. public class byteio {
  4.     public static void main(String args[])throws IOException{
  5.         byte[] data = new byte[10];
  6.         System.out .println("Enter some Characters ");
  7.         int numRead = System.in.read(data);
  8.         System.out.println("You Entered");
  9.         for(int i=0;i<numRead;++i){
  10.             System.out.println((char)data[i]);
  11.         }
  12.     }
  13. }
  14.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement