“在BuffredReador中出现错误:未报告的异常IOException;必须捕获或声明为抛出??”

时间:2019-09-15 19:09:43

标签: java

import java.io.BufferedReader;
import java.io.InputStreamReader;
public class Buffereader_example

{
  public static void main(String args[])

  {

    System.out.println("enter a number ");

    InputStreamReader obj=new InputStreamReader(System.in);

    BufferedReader obj2 = new BufferedReader(obj);

    int n =Integer.parseInt(obj2.readLine());

    System.out.println("the number is"+n);

  }
}

0 个答案:

没有答案