单选题在Java语言中,负责执行字节码.class文件的工具是______。
单选题以下程序的运行结果是( )。 main() int a[5],k; for(k=0;k<5;k++) a[k]=10*k; printf("%d", a[k-1]); A.40 B.35 C.50 D.45
单选题Java程序的解释执行过程分为( )。 A) 代码的装入、校验、执行 B) 代码的校验、装入、执行 C) 代码的校验、装入、执行 D) 代码的装入、执行、校验
单选题下列哪个是用来实现客户和服务者之间的通信?
单选题在下列排序方法中,平均时间性能为O(nlog2n)且空间性能最好的是( )。
单选题阅读下列代码 publicclassPerson{ staticintalt[]=newint[[10]; public static voidmain(Stringargs){ System.out.println{all[9]); } } 该代码的运行结果是( )。
单选题Java中哪个类提供了随机访问文件的功能? ( )
单选题执行下面程序后输出的正确结果是( )。 public class Test public static void main(String args[]) System.out.print(100%3); System.out.print(","); System.out.print(100%3.0); A.1,1 B.1,1.0 C.1.0, l D.1.0,1.0
单选题int数据类型是Java语言中是最常用的整数类型,它在计算机中存储时占多少位bit?
单选题阅读下述代码。 import Java.awt.*; import
Javax.swing.*; public class AskErame extends JFrame
{ public AskFrame() {
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); Container
pane=getContentPane(); JSlider value=new
JSlider(0,255,100); Pane.add(value);
setSize(450,150); setVisible(true);
setContentPane(pane); super(); }
public static void main(String [] arguments) {
AskFrame af=new AskFrame(); }
} 如果编译并运行它,将出现什么情况?
A.能够通过编译并正确运行
B.能够通过编译,但不会在框架中显示任何东西
C.由于其中的super()语句而无法通过编译
D.由于其中的setContentPane()语句而无法通过编译
单选题下列程序执行后,k的值是 public class Testhhh public static void main(String args[ ]) inti=6,j=8,k=10,m=7; if(i>j| |m k++; else k- -; System.out.println(k); A)12B)11C)10D)9
单选题下列语句输出结果为( )。 public class test { public static void main (String args[ ]) { int a=23,b=8,c=5; int e=a%(b%c); System.out.println(e); } }
单选题请阅读下面程序
public class ExampleStringBuffer{
public static void main(String[]args){
StringBuffer sb=new StringBuffer("test");
System.OUt.println("buffer="+sb);
System.OUt.println("length="+sb.length
());}}
程序运行结果中在"length="后输出的值是( )。
单选题JDK中提供的文档生成器是{{U}} {{/U}}。
A. java.exe
B. javap.exe
C. javadoc.exe
D. javaprof.exe
单选题下列哪个是反斜杠字符的正确表示( )。
单选题有如下程序 public class Test { int a,b; Test() { a=100; b=200; } Test(int x,int y) { a = x; b = y; } public static void main(String args[]) { Test Obj1=new Test(12,45); System.out.println("a = "Obj1.a+" b= "+Obj1.B) ; Test Obj1=new Test(); System.out.println("a = "Obj1.a+" b= "+Obj1.B) ; } } 程序的运行结果为( )。
单选题关于Applet执行的操作,下面说法正确的是( )。
单选题阅读下列代码片段 class
InterestTest______ActionListener{ …… public
void actionPerformed(ActionEvent event){ double
interest=balance * rate/100; balance +=interest;
NumberFormat format=NumberFormat.getCurrencyInstance();
System.out.print]b('balance='+formatter.format(balance)};
} Private double rate; }
在下画线处,应填的正确选项是{{U}} {{/U}}。
A.Implementation
B.Inheritance
C.implements
D.extends
单选题下列定义变量错误的是( )。
单选题下列代码中 if (x>0)System.out.printIn("first"); else if (x>-3)System.out.printIn ("second"); elseSystem.out .printIn("third"); 要求打印字符串为"second"时,x的取值范围是______。
