De so 3:
DCJ - Ð? thi lý thuy?t 02
1. Which of the following objects of MVC architecture represents all the data and the various states of the component?
Model *
View *
Controller *
All of the above.
2. Which of the following is not a type of Container?
Top-level
Bottom-level
General-purpose
None of the above.*
3. The JToolBar has a method _________ which can be used to make the edges of the toolbar buttons invisible.
JFileChooser
setRollover()
addSepartor()
4. The _________ method is used to set the current color of the color chooser.
setColor()
SETCOLOR()
Setcolor()
5. The methods isSelectedIndex() and isSelectionEmpty() are members of the ________ class.
JColor
JList
Jbox
6. The ______ method of JComboBox is used to retrieve the item at the specified index.
insertItemAt()
getItemAt()
removeItemAt()
7. The getMaximumRowCount() method of __________ is used to retrieve the maximum number of items the combo box can display without a scrollbar.
JList
JColorChooser
JComboBox
8. In JTable, headers and footers can be specified with an object of____________ class.
setTable
MessageFormat
TextFormat
9. The _________ class has methods to parse and convert text to a date.
SimpleDateFormat
DateFormat
DateTimeFormat
10. The ________ class cannot be instantiated as it is an abstract class.
URL connection
URL
ServerSocket class
11. The _________ method is used to retrieve the setting of the connection timeout of the URL in milliseconds.
getContentType()
getConnectTimeout()
setConnectTimeout()
12. A timeout value of zero of the setConnectTimeout() method indicates
Infinite timeout
Opening a communication link to the resource referenced
An exception raised
13. Instances of the ______ class can be used to read from and write to the resource referred by the URL.
URL
InetAddress
Connection
URLConnection *
14. An instance of the Socket class represents the _________ side of the connection.
server *
client
application
I/O
15. A ServerSocket instance binds itself to a __________ and then waits and listens for client requests to establish connections.
port *
socket
IP address
URLConnection
16. The remote object in an RMI application must extend from the _______________ class.
UnicastRemoteObject
Remote
RemoteException
UnicastServerObject
17. _________ application can be used to start the naming service on the server.
registry.exe
namingregistry.exe
rmiregistry.exe
registryservice.exe
18. The server application has to bind the remote object with a _____________ in the registry.
reference
name
remote reference
entry
19. A javax.mail.Session object can be created by invoking the static ________ method.
getInstance()
getProperties()
getSession()
initiateSession()
20. To retrieve a message from the mail server, one has to access the _________ first.
Session
Address
MIMEMessage
Store
21. __________ is the class used to contain email message.
Store
Inbox
Folder
Message
22. An instance of the ServerSocket class is used to represent the ________ side of the two-way communication.
server
client
application
I/O
23. A JFrame and a JApplet have a _______ layout by default.
Border
Card
Flow
Grid
24. Swing is a framework based on the Model-View-Controller (MVC) architecture in comparison to AWT, which was just a toolkit.
True
False
25. Which of the following describes Heavyweight components?
Platform dependent
Abstract Window Toolkit
GUI based application
Platform independent