下列常见的系统定义的异常中,哪个是数组越界异常 ( )
A:ArrayIndexOutOmoundsException B:IOException C:NullPointerException D:ArithmeticException
下列哪个选项不是InputStream类中的方法 ( )
A:public abstract int read()throws IOException B:public final void writeInt(int v)throws IOException C:public void close()throws IOException D:public int available()throws IOException
OutputStreamWriter类包含的方法主要有( )。
A:public OutputStreamWriter(OutputStream out) B:public voidwrite(intc) throws IOException C:public voidwrite(String str)throws IOException D:public flush throws IOException
Java语言中常用异常类IOException是用来处理 【11】 异常的类。
下列程序执行后的结果是______。 package ch1; import java.io.*; public class ex22 { static, String filename = "ch1/kfile22.txt"; public static void main(String[] args) { try { FileWriter fr = new FileWriter(filename); PrintWriter pr = new PrintWriter(fr); String name = "xiaoming"; String phone = "123456"; String age = "12"; pr.println(name + ’,’ + phone + ’,’ + age); pr.close( ); fr.close( ); } catch(IOException ioe) { ioe.printStackTrace( ) } } }
A:在包ch1 中新建一个文件file22.txt, 并且在其中写入一行字符串“xiaomingl2345612” B:在包ch1中新建一个文件file22.txt,并且在其中写入一行字符串“xiaoming, 123456,12” C:在包chi中新建一个文件file22.txt,并且在其中写入一行字符串“xiaoming’’ D:抛出IOException
下列常见的系统定义的异常中,哪个是输入、输出异常
A:ClassNotFoundException B:IOException C:FileNotFoundException D:UnknownHostException
下列常见的系统定义的异常中,哪个是数组越界异常
A:ArrayIndexOutOfBoundsException B:IOException C:NullPointerException D:ArithmeticException
Java语言中常用异常类IOException是用来处理 【11】 异常的类。