单选题下面选项中不属于简单数据类型的是( )。 A) 类 B) 布尔类型 C) 整数类型 D) 浮点类型
单选题下列程序执行后,m的值是( )。
public class Testbbb {
public static void main (String args[ ]) {
int a=10,b=3,m=5;
if(a= =B) m + =a;
else m:+ +a*m;
System.out.println(m);
}
}
单选题int类型的取值范围为( )。
单选题下列是Java的编译命令的是( )。
单选题有以下程序: #include <stdio.h> main() struct STU char name[9]; char sex; double score[2];; struct STU a= "Zhao",'m',85.0,90.0' b="Qian",'f',95.0,92.0; b=a; printf("%s,%c,%2.0f,0/02.0f/n", b.name, b.sex, b.score [0], b.score[1]); 程序的运行结果是( )。 A.Qian,f,95,92 B.Qian,m,85,90 C.Zhao,f,95,92 D.Zhao,m,85,90
单选题下面程序的输出结果是
____
。
#include <stdio.h>
void fun(int *s)
{ static int j=0;
do
{s[j]+=s[j+1];
}while(++j<2);
}
void main()
{ int k,a[10]={1,2,3,4,5);
for(k=1;k<3;k++)
fun(a);
for(k=0; k<5;k++)
printf("%d",a[k]);
}
单选题面向对象的四个主要特性是______
单选题在oneMethod( )方法运行正常的情况下,程序段将输出( )。
public void test( ){
try { oneMethod( );
System.out.println("condition 1");
} catch (ArrayIndexOutOfBoundsException e){
System.out.println("condition 2");
} catch(Exception e){
System.out.println("condition 3");
} finally {
System.out.pritln("finally");
}
}
单选题在软件生存周期中,能准确地确定软件系统必须做什么和必须具备哪些功能的阶段是______。
单选题下列变量的定义中,错误的是______。
单选题下列适配器类中不属于事件适配器的是( )。
单选题有以下程序:
void main()
{int a[3][2]={0},(*ptr)[2],i,j;
for(i=0;i<2;i++)
{ ptr=a+i,scanf("%d",ptr); ptr++; }
for(i=0;i<=3;i++)
{ for(j=0;j<2;j++) printf("%2d",a[i][j]);
printf("/n");
}
}
若运行时输入:1 2 3<回车>,则输出结果为______。
单选题下列包中,包含JOptionPane类的是( )。
单选题阅读如下程序。 public class Test4
{ public static void main(String args[])
{ int i=10,j=3; float
m=213.5f,n=4.0f; System.out.println(i%j);
System.out,println(m%n); } }
程序运行结果是______。
A.1.0和1.5
B.1和1.5
C.1.0和2.5
D.1和2.5
单选题在下列程序的空白处,应填入的正确选项是______。 import Java.io*;
pulilc class Obj ectStreamTest{ publilc static void
main(string args[]) throws IOException{ ObjectOutputStream
oos=new ObjectOutputStream (new
FileOutputStream("serial.bin")); Java until.Date d=new
Java.until Date(); oos (d);
ObjectInputStream ois= new ObjectInputStream(new
FileOutputStream("serial.bin")); try{ java
until.date restoredDate=
(Java.until.Date)ois.readObject(); System.out.println
("read object back from serial.bin file:"
+restoredDate); } catch(ClassNotFoundException
cnf) { System.out.println("class not found");
} }
A.WriterObject
B.Writer
C.BufferedWriter
D.WriterObject
单选题Java的核心包中,提供编程应用的基本类的包是______。
单选题当输入一个字节流时,要______。
单选题阅读下列代码 public class Test{ public static void main(String args[]){ System. out. println((2<0)? 10:8); } } 其运行结果是
单选题下列标识符中( )是不合法的。
单选题下列语句序列执行后,k的值是( )。 public class Test public static void main(String[] args) int m=3, n=6, k=0; while((m++)<(n--)) ++k; System. out. println(k); A) 0 B) 1 C) 2 D) 3