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