以下声明( )是对BufferedReader的正确声明。
A: BufferedReader(Reader in);
B: BufferedReader(String encoding,InputStream in);
C: BufferedReader(String encoding,File f);
D: BufferedReader(File f);
A: BufferedReader(Reader in);
B: BufferedReader(String encoding,InputStream in);
C: BufferedReader(String encoding,File f);
D: BufferedReader(File f);
举一反三
- 已知BufferedReader br=new BufferedReader(f),则“br.readLine()”返回对象的类型是
- 下列参数类型中适合构造BufferedReader对象的是___________。() A: BufferedWriter B: File C: InputStream D: FileReader
- 关于BufferedReader说法不正确的是()。 A: BufferedReader中有readLine方法 B: BufferedReader是字符流 C: BufferedReader的readLine方法,没有读到数据时会立即返回 D: BufferedReader的readLine方法,没有读到数据时会阻塞
- 下列语句错误的是:( ) A: ServerSocket svrsoc= new ServerSocket(8000); B: URL urlBase=new URL(“http://www. zjut.edu.cn/”) ; C: File inFile = new File(“C:/ test.txt”); D: BufferedReader br = new BufferedReader(“C:/ test.txt”);
- 下面的程序段创建了BufferedReader类的对象in,以便读取本机d盘my文件夹下的文件1.txt。File构造函数中正确的路径和文件名的表示是()。File f=new File(填代码处);file=new FileReader(f);in=new BufferedReader(file); A: "1.txt" B: "d:\\my\\1" C: "d:\\my\\1.txt" D: "d:\ my\1.txt"