单选题以下不属于对象的基本特点的是( )。 A.分类性 B.多态性 C.继承性 D.封装性
单选题下列关于线程优先级的说法中,正确的是( )。 A.线程的优先级是不能改变的 B.线程的优先级是在创建线程时设置的 C.在创建线程后的任何时候都可以设置 D.B和C
单选题编制好的程序,确保它的正确性和可靠性的同时,还应强调良好的编程风格。在书写功能性注解时应考虑( )。 A) 仅为整个程序做注解 B) 仅为每个模块做注解 C) 为程序段做注解 D) 为每个语句做注解
单选题下面程序段的输出结果是______。 class Test public static void main (String args[]) MyThread t=new MyThread(); t.displayOutput("t has been created"); t.start(); class MyThread extends Thread public void displayOutput(String s) System.out.println(s); public void run() displayOutput("t is running"); A) t has been created t is running B) t has been created C) t is running D) 编译错误
单选题在读字符文件Employee.dat时,使用该文件作为参数的类是( )。 A) BufferedReader B) DataInputStream C) DataOutputStream D) FileInputStream
单选题调用线程的下列方法,不会改变该线程在生命周期中状态的方法是______。
单选题非空的循环单链表head的尾结点(由p所指向),满足( )。 A) p->next==NULL B) p==NULL C) p->next=head D) p=head
单选题下列关于Applet中的归档文件叙述不正确的是A) 使用归档文件的好处是减少HTTP的连接次数,从而大大减少了Applet整体的下载时间B) 所有的浏览器都识别相同的归档文件格式和指定归档文件的HTML代码C) 归档文件是一种压缩文件,使用它也减少了文件的传输时间D) 使用JDK的jar工具创建JAR文件
单选题在Applet中显示文字、图形等信息时,应使用的方法是{{U}} {{/U}}。
A.init()
B.start()
C.paint()
D.destroy()
单选题关键字super的作用是( )。 A.用来访问父类被隐藏的成员变量 B.用来调用父类中被重载的方法 C.用来调用父类的构造函数 D.以上都是
单选题阅读如下程序代码。 class Test35 {
private float a; static public void m()
{ //... } }
如何使成员变量a被函数m()直接访问?______
A.将private float a改为protected float a
B.将private float a改为public float a
C.将private float a改为static float a
D.将private float a改为float a
单选题若有定义语句:char s[3][10],(*k)[3],*p;,则以下赋值语句正确的是( )。 A.p=s; B.p=k; C.p=s[0]; D.k=s;
单选题Java中,现成的Java类库被称为_______。
单选题下面的哪些程序段可能导致错误?
Ⅰ: String s = "Gone with the wind";
String t = "good ";
String k = s + t;
Ⅱ: String s = "Gone with the wind";
String t;
t = s[3] + "one";
Ⅲ: String s = "Gone with the wind";
String standard = s.toUpperCase();
Ⅳ: String s = "home directory";
String t = s-"directory":
单选题下面程序段的输出结果是 public class Test public static void main(String args[]) int n=5,sum=0; while(n>0) sum+=n; --n; System.out.println("sum is"+sum);
单选题为使Java程序独立于平台,Java虚拟机把字节码与各个操作系统及硬件
单选题给出下列代码,如何使成员变量m被方法fun()直接访问?
____
class Test
{
private int m;
public static void fun( )
{
...
}
}
单选题下面的程序执行后,屏幕上显示的应是
____
。
Pubhc class Exam{
public static void main(String[] args){
charchar1[]={"t","e","s","t"};
charchat2[]={"t","e","s","t","1"}
Sbing s1=new String(char1);
String s2=new String(char2,0,4);
System.out.println(s1.equals(s2));
}
}
单选题面向对象的四个主要特性是______
A.继承性、多态性、可靠性、可维护性
B.抽象性、封装性、正确性、高效性
C.抽象性、封装性、继承性、多态性
D.抽象性、继承性、高效性、可维护性
单选题以下哪些不是Java中有效的关键字( )。
