Posted By

nialace on 11/20/10


Tagged


Versions (?)

input stream read


 / Published in: Java
 

  1. import java.io.BufferedReader;
  2. import java.io.IOException;
  3. import java.io.InputStreamReader;
  4.  
  5.  
  6. public class TestInputRead {
  7.  
  8.  
  9. public static void main(String[] args) {
  10.  
  11. String response = null;
  12. System.out.println("write something : ");
  13.  
  14. try {
  15. response = br.readLine();
  16. } catch (IOException e) {
  17. e.printStackTrace();
  18. }
  19.  
  20. System.out.println("you entered :"+response);
  21.  
  22. }
  23.  
  24. }

Report this snippet  

You need to login to post a comment.