问题 单项选择题

下面哪一个不是InputStream类中的方法

A.int read(byte[ ])

B.void flush( )

C.void close( )

D.int available( )

答案

参考答案:B

解析:[分析] InputStream类所包括的主要方法有public int read(byte[ ]b)throws IOException、long skip(long n)、public int available( )throws IOException和public void close( )throws IOException。选项B中的void flush( )方法并不属于InputStream类中的方法。

填空题
单项选择题