/* InputStream을 이용한 문자열 입출력 */
import java.io.IOException;
import java.io.InputStream;
public class InputStreamTest
{
 public static void main(String args[])
 {
  InputStream is = System.in; // 추상클래스이므로 객체 생성 불가능
  
  while(true)
  {
   try
   {
    int tmp = is.read();
    if(tmp == -1)
     break;
    else
     System.out.print((char)tmp);     
   }
   catch(IOException e)
   {
    e.printStackTrace();
   }
  }
 }
}
댓글 없음:
댓글 쓰기