收藏 分享(赏)

Java期中试题.doc

上传人:hskm5268 文档编号:7057205 上传时间:2019-05-04 格式:DOC 页数:2 大小:25.50KB
下载 相关 举报
Java期中试题.doc_第1页
第1页 / 共2页
Java期中试题.doc_第2页
第2页 / 共2页
亲,该文档总共2页,全部预览完了,如果喜欢就下载吧!
资源描述

1、1.What method do you use to set the location of a frame on the screen? b. setLocation2. What layout manager do you use to place three components in a frame so that all the components have the same size?c. GridLayout3. What is the default layout manager for the content pane of a JFrame?b. BorderLayou

2、t4. _ sets a background of a JPanel object p to yellow.b. p.setBackground(Color.yellow)5. _ draws a circle whose center position is (400, 400) and whose radius is 50.b. g.drawOval(350, 350, 100, 100)6. What method do you use to disable editing on an instance jtf of JTextField?b. jtf.setEditable(fals

3、e)7. Can a JComboBox instance generate the following events? d. All above8. The method that executes immediately after the init() method in an applet is _.b. start()9. Which is not a Generic wildcard in following?c. ? implements T 10. Which is not an instance of List? d. AbstractList 1. Three concre

4、te classes of Set are: x1,which hasnt order; x2, which has order; x3,which is sorted. x1 的指定答案: HashSet x2 的指定答案: LinkedHashSet x3 的指定答案: TreeSet 2. To create a thread, you can implements the x4 interface.x4 的指定答案: Runnable 3. A shared resource may be corrupt if it is accessed simultaneously(同时地) by

5、 multiple thread. To avoid this, the keywords x5 can be used to synchronize the methods. x5 的正确答案: synchronized4. To create a server socket, you can use x6. The the method x7 is used to listen.x6 的正确答案: ServerSocketServerSocket(port)ServerSocket()x7 的正确答案: acceptaccept()5. x8 is used to execute a precompiled(预编译) SQLstatement with or without parameters(参数). x8 的正确答案: PreparedStatement6. To connect a databse, use the static method x9 in the DriverManager class; the result of query is saved in x10. x9 的正确答案: getConnectiongetConnection(databaseURL)getConnection()x10 的正确答案: ResultSet

展开阅读全文
相关资源
猜你喜欢
相关搜索
资源标签

当前位置:首页 > 企业管理 > 管理学资料

本站链接:文库   一言   我酷   合作


客服QQ:2549714901微博号:道客多多官方知乎号:道客多多

经营许可证编号: 粤ICP备2021046453号世界地图

道客多多©版权所有2020-2025营业执照举报