几个面世题求解 最好能给出解释 谢谢

林初茵 2009-03-23 09:42:51


1 How can you create a listener class that receives events when the mouse is moved(single Answer)
A By extending MouseListener
B By implementing MouseListener
C By extending Mouse Motion Listener
D By implementing Mouse Motion Listener
E Either by extending Mouse Motion Listener or extending MouseListener
F Either by implementing Mouse Motion Listener or implementing MouseListener

2 Which are not containers in Java?(Multiple answer)
A ScollPane
B Canvas
C Scrollbar
D Applet
E Dialog

3 You are assign the task of building a panel containing a TextArea at the top, a label directly below it, and a button directly below the label. If the three components are added directly to the panel, which layout manager can be panel use to ensure that the TextArea absorbs all of the free vertical space when the parel is resized?

4 Please draw the correct symbols for the following concepts in UML class diagram. Class Interface, Generalization, Realization.

5 For a binary tree,If the in-order traversal sequence is A B C D E F G and post-order traversal seuqence is B D C A F G E then what is its pre-order traversal sequence?
A. EGFACDB
B. EACBDGF
C. EAGCFBD
D. None of the above

6 Which of the following items demonstrates the key characteristics of Web 2.0?
A Centralized
B User centered design
C Open
D Light Weight

7 which is true about UML
A UML is a standardlized approach for use case modeling.
B UML supplies a set of notations used in the design of applications.
C UML is a methodology for designing and maintaining computer systems
D UML stands for Unified Method tcherLanguage.


8 When using the writeObject method to store the state of n object, how can you protect sensitive data from being accessed in the stored object?
A Implement the Object as Exteralizable
B Declare the sensitive fields as private transisent
C Declare the sensitive fields as static
D Declare the sensitive fields as protected

9 You need to store elements in a collection that guarantees that no duplicates are stored and all elements can be access in nature order, which interface provides that capability?
A java.uil.Map
B java.util.Collection
C java.util.List
D java.util.SortedSet
E java.util.SortedMap
F java.util.Set

10 What will happen when you attempt to compile and run this code?

abstract class Base{
abstract public void myfunc();
public class Abs extends Base{
public static void main(String argv[])
{
Abs a = new Abs();
a.amethod();
}
public void amethod(){
System.out.println("A method");;
}
}

A The code will compile and run, printing out the words "A method"
B The compiler will complain errors in Base class.
C The code will compile but complain at run time that the Base class has none abstract methods.
D The compiler will complain errors in Abs class.







...全文
219 16 打赏 收藏 转发到动态 举报
写回复
用AI写文章
16 条回复
切换为时间正序
请发表友善的回复…
发表回复
zengtc 2009-03-25
  • 打赏
  • 举报
回复
学习
KingZChina 2009-03-25
  • 打赏
  • 举报
回复
第二题错了 Dialog 是容器 查看了一下api Dialog 继承 window类 window类继承container
KingZChina 2009-03-25
  • 打赏
  • 举报
回复
[Quote=引用 11 楼 blackhost 的回复:]
6 Which of the following items demonstrates the key characteristics of Web 2.0?
A Centralized
B User centered design
C Open
D Light Weight
选【B】,这个不确定,呵呵,我不做WEB的
================
我也认为是B,以用户为中心进行设计是Web2.0的主要特点,其他的也都是Web2.0的特点,但是都是围绕这个为中心的设计原则和表现特征。
[/Quote]

同意B
blackhost 2009-03-25
  • 打赏
  • 举报
回复
6 Which of the following items demonstrates the key characteristics of Web 2.0?
A Centralized
B User centered design
C Open
D Light Weight
选【B】,这个不确定,呵呵,我不做WEB的
================
我也认为是B,以用户为中心进行设计是Web2.0的主要特点,其他的也都是Web2.0的特点,但是都是围绕这个为中心的设计原则和表现特征。
hiryzhu 2009-03-25
  • 打赏
  • 举报
回复
7) UML=Unified Modeling Language D好像不对吧
yizhizouxiaqu 2009-03-25
  • 打赏
  • 举报
回复
五楼回答的很好,第三题我认为BorderLayout更好一些,web2.0那个我选D
zhaoqiang415362381 2009-03-25
  • 打赏
  • 举报
回复
他NN的,,还是考六级去
jongsuny 2009-03-25
  • 打赏
  • 举报
回复
同意10楼的看法.
meander 2009-03-25
  • 打赏
  • 举报
回复
up
  • 打赏
  • 举报
回复
这个是哪个公司的啊
怎么还用外语
奶奶的 看不懂
wclszh 2009-03-24
  • 打赏
  • 举报
回复
帮你顶
moolf 2009-03-24
  • 打赏
  • 举报
回复
慢慢看 你能看懂的!
Hei_Hei 2009-03-24
  • 打赏
  • 举报
回复
第二题 Canvas 应该也是容器类吧
wang511123 2009-03-24
  • 打赏
  • 举报
回复
[Quote=引用楼主 jinder22 的帖子:]


1 How can you create a listener class that receives events when the mouse is moved(single Answer)
A By extending MouseListener
B By implementing MouseListener
C By extending Mouse Motion Listener
D By implementing Mouse Motion Listener
E Either by extending Mouse Motion Listener or extending MouseListener
F Either by implementing Mouse Motion Listener or implementing MouseList…
选【D】很简单,鼠标移动事件是MouseMotionListener,这是个接口

2 Which are not containers in Java?(Multiple answer)
A ScollPane
B Canvas
C Scrollbar
D Applet
E Dialog
选【B、C、E】题目要是不是容器的,容器就是能放组件的东东,那Canvas(画布),Scrollbar(滚动条),Dialog(对话框)均不是容器。

3 You are assign the task of building a panel containing a TextArea at the top, a label directly below it, and a button directly below the label. If the three components are added directly to the panel, which layout manager can be panel use to ensure that the TextArea absorbs all of the free vertical space when the parel is resized?
答案:GridLayout、Box、BorderLayout、GridBagLayout都可以

4 Please draw the correct symbols for the following concepts in UML class diagram. Class Interface, Generalization, Realization.
答案:这个在网页上不会画

5 For a binary tree,If the in-order traversal sequence is A B C D E F G and post-order traversal seuqence is B D C A F G E then what is its pre-order traversal sequence?
A. EGFACDB
B. EACBDGF
C. EAGCFBD
D. None of the above
选【B】,二叉树中序和后序求前序。

6 Which of the following items demonstrates the key characteristics of Web 2.0?
A Centralized
B User centered design
C Open
D Light Weight
选【B】,这个不确定,呵呵,我不做WEB的


7 which is true about UML
A UML is a standardlized approach for use case modeling.
B UML supplies a set of notations used in the design of applications.
C UML is a methodology for designing and maintaining computer systems
D UML stands for Unified Method tcherLanguage.
选【D】


8 When using the writeObject method to store the state of n object, how can you protect sensitive data from being accessed in the stored object?
A Implement the Object as Exteralizable
B Declare the sensitive fields as private transisent
C Declare the sensitive fields as static
D Declare the sensitive fields as protected
选【B】

9 You need to store elements in a collection that guarantees that no duplicates are stored and all elements can be access in nature order, which interface provides that capability?
A java.uil.Map
B java.util.Collection
C java.util.List
D java.util.SortedSet
E java.util.SortedMap
F java.util.Set
选【D】,Set保证唯一,Sorted保证排序

10 What will happen when you attempt to compile and run this code?

abstract class Base{
abstract public void myfunc();
}

public class Abs extends Base{
public static void main(String argv[])
{
Abs a = new Abs();
a.amethod();
}
public void amethod(){
System.out.println("A method");;
}
}

A The code will compile and run, printing out the words "A method"
B The compiler will complain errors in Base class.
C The code will compile but complain at run time that the Base class has none abstract methods.
D The compiler will complain errors in Abs class.

选【D】
[/Quote]

晕,这都是些什么题啊?难道是社会上所谓培训班的考题?
wohi4io0 2009-03-24
  • 打赏
  • 举报
回复
看英语就烦
筱伟 2009-03-23
  • 打赏
  • 举报
回复
期待大侠!

62,614

社区成员

发帖
与我相关
我的任务
社区描述
Java 2 Standard Edition
社区管理员
  • Java SE
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧