单选题下列代码的执行结果是( )。 public,class Test1 { public static void main(String args[]) { System.out.println(5/2); } }
单选题Applet的默认布局管理器是______。
单选题下面关于Java代码安全的说法不正确的是( )。
单选题下面有关接口的说法中正确的是( )。 A) 接口与抽象类是相同的概念 B) 实现一个接口必须实现接口的所有方法 C) 接口之间不能有继承关系 D) 一个类可实现多个接口
单选题设执行下面的赋值语句:
A=Float.valueOf("12.34").floatValue();
后,a的值是
____
。
单选题某学校的工资管理程序属于( )。
单选题下列哪个选项是short型数据的取值范围?
A.-128~+127
B.-32768~ +32767
C.-2147483648~ +2417483647
D.-3.40282347E38 ~ +3.40282347E38
单选题若有以下程序:
#include<stdio.h>
void f(int n);
void main()
{ void f(int n),
f(5);
}
void f(int n)
{ printf("%d/n",n);}
则以下叙述中不正确的是
____
。
单选题在下列程序的空白处,应填入的正确选项是______。 import java. io. * ; Public class writeInt Public static void main(string[]a) Int[]myArray=10,20,30,40); try DataOutputSystem dos=new DataOutputSystem (new FileOutputSystem("ints. dat")); for(int i=0; I<MYARRAY. LENGTH. I++) dos. writeInt(myArray[i]); dos. ______; System. out. println ("Have written binary file ints. dat"); Catch(IOException ioe) System. out. println("IO Exception"); A.start() B.close() C.read() D.write()
单选题在Java中,能实现多重继承效果的方式是( )。
单选题字符输出流类的直接父类是______。
A.Writer
B.Reader
C.File
D.IOStream
单选题下列______方法可以用于消除容器的布局管理器。
A.setSize()
B.setLayout(null)
C.setLocation()
D.setFont()
单选题下列Applet将已知char型数组各元素的值(设分别为65,66,70,80,67,78)显示在屏幕上。选择正确的语句填入横线处。 import java.awt.*; import java.applet.*; public class ex33 extends Applet { char a[] = {65, 66, 70, 80, 67, 78}; int j = 30; public void paint(Graphics g) { for(int i = 0; i <= a.length; i ++) { ______ += 25; } } }
单选题表达式sizeof(double)是( )。 A.函数调用 B.double型表达式 C.int型表达式 D.非法表达式
单选题以下叙述中错误的是
____
。
单选题阅读下列程序片段
Public void test(){
Try{
sayHello();
system.out.println(“hello”);
} catch (ArrayIndexOutOfBoundException e) {
System.out.println(“ArrayIndexOutOfBoundException”);
}catch(Exception e){
System.out.println(“Exception”);
}finally {
System.out.println(“finally”);
}
}
如果sayHello( )方法正常运行,则test( )方法的运行结果将是
单选题阅读下面程序 import javax.swing.JOptionPane; public class BreakLabelTest { public static void main( String args[] ){ String output=""; stop: { for (int row=1; row<=10; row++) { for (int column=1; column<=5; column++ ) { if ( row=5 ) break stop; output+="* "; } output +="/n"; } output +="/nLoops terminated normally"; } JOptionPane.showMessageDiaiog( null, output,"用一个标志测试break语句", JOptionPane.INFORMATION_MES SAGE ); System.exit( 0 ); } } 程序运行结果是( )。
单选题有以下程序: #include <stdio.h> main() int x=1, y=2, z=3; if (x>y) if (y<z) printf("%d",++z); else printf("%d",++y); printf("%d/n",x++); 程序的运行结果是( )。 A.331 B.41 C.2 D.1
单选题关于MappedByteBuffer类,下列叙述正确的是______。
A.可以提高读/写速度
B.提供了把磁盘文件映入内存的通道
C.把内存缓冲区的内容映射到了磁盘文件上
D.具有map()方法,可以将文件映入内存
单选题在数据库系统中,用户所见的数据模式为
____
。
