A.0XA6
B.0144
C.1840
D.-lE3
单选题 | 下列程序的输出结果是( )。 public class Test{ public static void main(String[]args){ int[]array=(2,4,6,8,lO); int size=6; int result =-1: try{ for(int i=0;i(size 8L&result= = -1;) if(array[i]= =20)result=i: } catch(ArithmeticException e){ System.out.println("Catch- - -l"); } catch(ArraylndexOutOfBoundsException e){ System.out.println("Catch- - -2"); } catch(Exception e){ System.out.println("Catch- - -3");) } } |
查看答案 |
单选题 | 能打印出一个双引号的语句是( )。 | 查看答案 |
单选题 | Java类库中,将信息写入内存的类是( )。 | 查看答案 |
单选题 | 下列叙述中,错误的是( )。 | 查看答案 |
单选题 | 下列程序的功能是统计字符串中“array”的个数,在程序的空白处应填入的正确选项是( )。 public class FindKeyWords( public static void main(sring[]args){ sting text= "An array is a data structur that stores a eollection of" +"values of the same type.You access each individu- al value" +"through an integer index.For example.if a is an array" +"of inergers,then all]is the ith integer in the ar- ray."; Int arrayCount=0; Int idex=-l; Sting arrarStr="array": Index=text.indexof(arrayStr); While(index 0){ ++arrayCount: Index+=arrayStr.1ength(); Index=text.indexof(arrayStr,index); } System.OUt.println ("the text contains"+arrayCount+"arrays"); } } |
查看答案 |
单选题 | 下列关于HTML标记的说法,正确的是( )。 | 查看答案 |
单选题 | 下列数据结构中,能用二分法进行查找的是( )。 | 查看答案 |
单选题 | J2EE和( )语言绑定。 | 查看答案 |
单选题 | 阅读下列Java语句: ObjectOutputStream OUt=new ObjeetOutputStream (new ("employee.dat")); 在下画线处,应填的正确选项是( )。 |
查看答案 |
单选题 | 下列各项中代表八进制整数的是( )。 | 查看答案 |
单选题 | 下面( )不是InputStream类中的方法。 | 查看答案 |
单选题 | 如果应用程序要在Applet上显示输出,则必须重写的方法是( )。 | 查看答案 |
单选题 | 下列程序的运行结果是( )。 public class test{ private String[]data={¨10","10.5"); public void fun(){ double s=0: for(int i=0;i<3;j++){ try{ s=s+Integer.parseInt(data[i]); catch(Exception e){ System.out.print("errorl:"+data[i]); } } } public static void main(string[]args){ try{ test d=new test(): fun(): }catch(Exception e){ System.OUt.println("error2") } } } |
查看答案 |
单选题 | 下列叙述中正确的是( )。 | 查看答案 |
单选题 | 下列Java语句从指定网址读取html文件,在下画线处应填上的选项是( )。 Reader in=new——(new URL(urlString). openStream()); |
查看答案 |
单选题 | 阅读下面代码 if(x= =0){System.out.println("冠军");) elseif(x>一3){System.Out.println("亚军");} else{System.out.println("季军");} 若要求打印字符串”季军”,则变量X的取值范围是( )。 |
查看答案 |
单选题 | 若数组a定义为int[][]a=new int[3][4],则a是( )。 | 查看答案 |
单选题 | Java程序默认引用的包是( )。 | 查看答案 |
单选题 | 下列特点中不属于Java的是( )。 | 查看答案 |
单选题 | 单击窗口内的按钮时,产生的事件是( )。 | 查看答案 |