不定项选择题给出以下语句: String s=hello; String t=hello; char c[]={h,e,l,l,o}; 以下语句返回true的是______。 A.s.equals(t); B.t.equals(c); C.s==t;D.t.equals(new String(hello)); E.t==c;
不定项选择题Which are not Java keywords? A.TRUE B.sizeof C.const D.super E.void
不定项选择题给出下面的代码: 1)public Void modify() { 2)int i, j, k; 3)i=100; 4)while ( i>0 ) { 5)j=i*2; 6)System.out.println (The value of j is+j ); 7)k=k+ 1; 8)i--; 9)} 10)} 第______行在编译时可能产生错误。 A.4 B.6 C.7 D.8
不定项选择题给出下面的代码: public class Test { Void printValue(int m){ do{ System.out.printIn(The Value is+m); } while(--m>10) } public static void main(String arg[]) { int i=10; Test t=new Test(); t.printValue(i); } } 输出将是______。 A.The value is 8 B.The value is 9 C.The value is 10 D.The value is 11
不定项选择题在Java API文档中______被包括在内。 A.类及用途的描述 B.父类的方法的列表 C.成员变量的列表 D.类层次
不定项选择题Which of the following statements about variables and their scopes are true? A.Instance variables are member variables of a class B.Instance variables are declared with the static keyword C.Local variables defined inside a method are created when the method is executed D.Local variables must be initialized before they are used
不定项选择题下面关于继承的叙述正确的是______。 A.在Java中只允许单一继承 B.在Java中一个类只能实现一个接口 C.在Java中一个类不能同时继承一个类和实现一个接口 D.Java的单一继承使代码更可靠
不定项选择题Which of the following statements are true? A.The equals() method determines if reference values refer to the same object B.The == operator determines if the contents and type of two separate objects match C.The equals() method returns true only when the contents of two objects match D.The class File overrides equals() to return true if the contents and type of two separateobjects match
不定项选择题线切割加工编程时,计数长度应( )。 A.以μm为单位 B.以mm为单位 C.写足4位数 D.写足5位数 E.写足6位数
不定项选择题FilterOutputStream类是BufferedOutputStream、DataOutputStream和PrintStream的父类。下列______类是FilterOutputStream类构造符的参数. A.InputStream B.OutputStream C.File D.RandomAccessFile E.StreamTokenizer
不定项选择题在switch(expression)语句中,expression的数据类型不能是______。 A.double B.char C.byte D.short
不定项选择题下面的Java源文件代码片断正确的是______。 A.package testpackage; public class Test{//do something…} B.import java.io.*; package testpackage; public class Test{//do something…} C.import java.io.*; class Person{//do something…) public class Test{//do something…} D.importjava.io.*; importjava.awt.*; public class Test{//do something…}
不定项选择题Which declarations of identifiers are legal? A.$persons B.TwoUsers C.*point D.this E._endline
不定项选择题Which statements about inheritance are true? A.In Java programming language only allows single inheritance B.In Java programming language allows a class to implement only one interface C.In Java programming language a class cannot extend a class and implement a interfacetogether D.In Java programming language single inheritance makes code more reliable
不定项选择题使用“<<”和“>>”操作符的陈述正确的是______。 A.0000 0100 0000 0000 0000 0000 0000 0000<<5得到 1000 0000 0000 0000 0000 0000 0000 0000 B.0000 0100 0000 0000 0000 0000 0000 0000<<5得到 1111 1100 0000 0000 0000 0000 0000 0000 C.1100 0000 0000 0000 0000 0000 0000 0000>>5得到 1111 1110 0000 0000 0000 0000 0000 0000 D.1100 0000 0000 0000 0000 0000 0000 0000>>5得到 0000 0110 0000 0000 0000 0000 0000 0000
不定项选择题给出下面不完整的类代码: class Person { String name, department; int age; public Person(String n){ name=n; } public Person(String n, int a){name=n; age=a; } public Person(String n, String d, int a) { // doing the same as two arguments version of constructor // including assignment name=n,age=a department=d; } } 下面的表达式可以加到构造方法中的doing the same as…”处的是______。 A.Person(n,a); B.this(Person(n,a));C.this(n,a); D.this(name,age);
不定项选择题Given the following code fragment: 1)public void create() { 2) Vector myVect; 3) myVect = new Vector() ; 4) } Which of the following statements are true? A.The declaration on line 2 does not allocate memory space for the variable myVect B.The declaration on line 2 allocates memory space for a reference to a Vector object C.The statement on line 2 creates an object of class Vector D.The statement on line 3 creates an object of class Vector E.The statement on line 3 allocates memory space for an object of class Vector
不定项选择题main()方法的返回类型是什么? A.int B.void C.Boolean D.static
不定项选择题使窗口在全屏显示模式和常规显示模式间切换,应使用( )。 A.Ctrl+Shift B.Shift+Alt+Enter C.Ctrl+Shift+Alt D.Shift+Enter
不定项选择题下面的程序片断可能导致错误的是______。 A.String s=Gone with the wind; Stringt=good; String k=s+t; B.String s=Gone with the wind; String t; t=s[3]+one; C.String s=Gone with the wind; String standard=s.toUpperCase(); D.String s=home directory; String t=s-directory;
