| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 451 人关注过本帖
标题:再加一些题
只看楼主 加入收藏
wxyljp
Rank: 1
等 级:新手上路
帖 子:8
专家分:0
注 册:2007-3-23
收藏
 问题点数:0 回复次数:1 
再加一些题

8. Which expressions are true? (3 Points)( )
A String s="Hello "; int i=3; s+=i;
B String s=" Hello "; int i=3; if(i==s){ s+=i};
C String s=" Hello "; int i=3; s=i+s;
D String s=" Hello"; int i=3; s=i+;
E. String s=null; int i=(s!=null)&&(s.length>0)?s.length():0;

9. Which methods can create a runable class? (3 Points)
A public class X implements Runable{ public void run(){ ......} }
B public class X implements Thread{ public void run(){ ......} }
C public class X implements Thread{ public int run(){ ......} }
D public class X implements Runable{ protected void run(){ ......} }
E.public class X implements Thread{ public void run(){ ......} }

10. Which statements below are true? (3 Points)
A java.lang.Clonable is a class
B java.lang.Runnable is an interface
C Double object is in the java.lang package
D The expression “Double a=1.0” is true.

11. Which statement or statements are true about the code listed below? (3 Points)
public class MyTextArea extends TextArea {
public MyTextArea(int nrows, int ncols) {
enableEvents(AWTEvent.TEXT_
EVENT_MASK);
}

public void processTextEvent (TextEvent te) {
System.out.println(“Processing a text event.”);
}
}
A. The source code must appear in a file called MyTextArea.java
B. Between lines 2 and 3, a call should be made to super(nrows, ncols) so that the new component will have the correct size.
C. At line 6, the return type of processTextEvent() should be declared boolean, not void.
D. Between lines 7 and 8, the following code should appear: return true.
E. Between lines 7 and 8, the following code should appear: super.processTextEvent(te).

搜索更多相关主题的帖子: methods public create null 
2007-03-23 21:24
zhaoyg
Rank: 1
等 级:新手上路
帖 子:328
专家分:0
注 册:2006-8-28
收藏
得分:0 
发错论坛了,这里是C,

麻雀飞上枝头变凤凰,而菜鸟的我飞上枝头却感冒了,为什么我的脑袋如此的不管用呢。
2007-03-23 21:45
快速回复:再加一些题
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.043566 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved