会计考友 发表于 2012-8-4 12:33:16

JAVA认证历年真题:310-025精选题(20)

60. Given a TextField that is constructed like this:
TextField t = new TextField(30);
Which statement is true?
A. The displayed width is 30 columns.
B. The displayed string can use multiple fonts.
C. The user will be able to edit the character string.
D. The displayed line will show exactly thirty characters.
E. The maximum number of characters in a line will be thirty.
AC.
61. What does the java runtime option -cs do?
A. check source with debug report
B. clear classes that are existing when starting compilation.
C. check if the source is newer when loading classes.
62. When is an action invoked?
A. TextField Enter
B. TextArea Enter
C. Scrollbar
D. MouseDown
E. Button
AE.
63. What error does the following code generate?
class SuperClass{
SuperClass(String s){}
}
class SubClass extends SuperClass{
SubClass(){}
}
......
SubClass s1 = new SubClass("The");
SuperClass s = new SubClass("The");
A. java.lang.ClassCastException
B. Wrong number of arguments in constructor
C. Incompatible type for =. Can't convert SubClass to SuperClass.
D. No constructor matching SuperClass found in class SuperClass.
BD.
64. How do you declare a native method called myMethod in Java?
Answer:
public native void myMethod();
页: [1]
查看完整版本: JAVA认证历年真题:310-025精选题(20)