ĐỀ THI LÝ THUYẾT JAVA XỬ LÝ PHÂN TÁN
Trang 1All 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
Trang 2maximum number of items the combo box can display without a scrollbar.
11 The _ method is used to retrieve the setting of the connection timeout
of the URL in milliseconds
13 Instances of the class can be used to read from and write to the
resource referred by the URL
URL
InetAddress
Connection
URLConnection
Trang 314 An instance of the Socket class represents the _ side of the connection.
Trang 420 To retrieve a message from the mail server, one has to access the _ first.
Abstract Window Toolkit
GUI based application
Platform independent
Đề 2:
Trang 51.Successful translation of the source files in the desired language is very difficult.
5.Which of the following is not of RMI architecture?
A.Stub and Skeleton
Trang 6value of 50.
A.JSlider(int orientation)
B.JSlider(int value)
C.JSlider() *
D.JSlider(int min, int max, int value)
8.Which of the following are the advantages of using FlowLayout Manager?
a.Simple to use
b.Component placed in the center of the contain by default
c.Suitable for JApplet which runs as part of a Web Page
d.Complex alignment can be easily achieved
Trang 7A.getSelectedFile() *
B.getCurrenDirectory()
C.getFile()
D.All of the above
14.Which of the following constructors of the JToolBar constructs a toolbar with the default horizotal orientation ?
A.JToolBar() *
B.JToolBar(int orientation)
C.JToolBar(String title)
D.None of the above
15.JList is a class used to dislay a group of items The items in a JList can be displayed in one or more columns
D.All of the above
17.Which of the following are the important methods of a JComboBox ?
Trang 820.An internationalized and localized program has which of the following benefits?
a.Same executable application can run worldwide
b.Textual elements for GUI components are not hard-coded in the program
c.Support for new language requires only recompilation
d.Internationalized programs are localized quickly
1.Successful translation of the source files in the desired language is very difficult
Việc dịch thành công của các nguồn tập tin trong các ngôn ngữ là rất khó khăn
A.True *
B.False
2.A locale is an identifier for a particular combination of language and redion
Locale là một định danh cho một sự kết hợp đặc biệt của ngôn ngữ và redion
Trang 95.Which of the following is not of RMI architecture?
Điều nào sau đây là không phải của cấu trúc RMI?
A.Stub and Skeleton
D.JSlider(int min, int max, int value) nhở nhất,lớn nhất,giá trị
8.Which of the following are the advantages of using FlowLayout Manager?
Câu nào sau đây là những lợi thế của việc sử dụng flowLayout Manager?
Trang 10như một phần của một trang web.
d.Complex alignment can be easily achieved. Dễ dàng liên kết các thành phần phức tạp
JPopupMenu là thuận tiện hơn so với các trình tiêu chuẩn đơn bởi vì nó liên quan đến việc
di chuyển chuột nhiều hơn
A.True
B.False *
11.The addSeparator() method adds a separator at the _ of the pop-up menu
AddSeparator () là hàm bổ sung thêm một khoảng cách _ của menu pop-up
A.Beginning. bắt đầu
B.End. kết thúc
C.Center * Trung tâm
D.Anywhere bất kì chỗ nào
12.The JFileChooser has which of the following methods?
JFilechooser có các hàm nào sau đây?
13.Which of the following methods of the JFileChooser returns an instance of the File
representing the file selected from the dialog box ?
Các hàm nào sau đây của JFileChooser trả về một trường hợp của các tập tin đại diện cho các tập tin được chọn từ hộp thoại?
Trang 1114.Which of the following constructors of the JToolBar constructs a toolbar with the default horizotal orientation ?
Các Constructer nào sau đây của JToolBar xây dựng một thanh công cụ với định hướng ngang mặc định?
A.JToolBar() *
B.JToolBar(int orientation)
C.JToolBar(String title)
D.None of the above
15.JList is a class used to dislay a group of items The items in a JList can be displayed in one or more columns
JList là một lớp được sử dụng để hiển thị một nhóm các Item Các Item trong một JList có thể được hiển thị trong một hoặc nhiều cột
A.True
B.False *
16.Which of the following selectModes of List class allows selecting a contigous item?
Các selectModes của lớp Danh sách nào sau đây cho phép chọn gần kề 1 Item?
A.SINGLE_SELECTION
B.MULTIPLE_INTERVAL_SELECTION
C.SINGLE_INTERVAL_SELECTION
D.All of the above
17.Which of the following are the important methods of a JComboBox ?
Những hàm nào sau đây là hàm quan trọng của một JComboBox?
18.A JTable has which of the following distinct parts?
JTable có của các phần riêng biệt sau đây?
a.Column Header
b.Row Header
3.Data
A.a,b
Trang 1220.An internationalized and localized program has which of the following benefits?
Một chương trình quốc tế và địa phương có những lợi ích nào sau đây?
a.Same executable application can run worldwide. Thực thi cùng một ứng dụng có thể chạytrên toàn thế giới
b.Textual elements for GUI components are not hard-coded in the program. Các yếu tố vănbản cho các thành phần giao diện đồ họa không mã hóa cứng trong chương trình
c.Support for new language requires only recompilation. mới chỉ Hỗ trợ ngôn ngữ yêu cầu biên dịch lại
d.Internationalized programs are localized quickly. Chương trình quốc tế được bản địa hoá một cách nhanh chóng
1 Which of the following statements about the reply() method of the message class is true ?
1.The reply() method returns a message properly configured to reply to the sender or all recepients of the message.
2 The reply() method automatically adds "Re:" to the subject line of the message
3 The reply() method adds the original text of the message edited by the user to body of the message
4 The message object returned by the reply() method is a new Message object.
1 1,2,3
2 B 1,2,4
Trang 131 2,3,4
2 1,3,4
2 Identify the correct answer :
Statement 1 : The parse() method of the InternetAddress class is used to check if the specified addresses are valid Statement 2 : The static methods of the javax.mail Transport class throw a SendFailedException of any of the Recepient's address is found to be invalid
1 Only Statement 1 is true
2 B Only Statement 2 is true
1 Both Statement 1 and 2 are true
2 Both Statement 1 and 2 are false
3 Which of the following statement is false about Model-View-Controller architecture ?
1 The Model represents all the data and the various states of the component.
2 The View depicts the graphical part on the screen.
3 The Controller is responsible for determining whether the component should react any input events from input devices such as the keyboard or mouse
4 A Model is bound to a specific View or Controller
Trang 1511 Which of the following features are true regarding lightweight components ?
1 They are platform independent d
2 They do not consume extra overheads in terms of memory and execution time d
3 They render themselves with pure Java code.
4 They depend on external native language code like C/C++ which forms the peer equivalent
1 1,2,3,4
2 2 and 4
3 C 1,2 and 3
1 1,3 and 4
12 Which of the following methods are supported by JPopupMenuclass ?
1 publicJMenuItem add(JMenuItem item)
2 public void addSeparator()
3 public void setDefaultLightWeightPopupEnabled()
4 public static void setDefaultLightWeightPopupEnabled(boolean Lightweight)
1 2,3 and 4
Trang 162 2 and 3
3 1 and 4
4 D 1,2 and 4
13 Which of the following statements are true about Properties Files ?
Statement 1 : The value in a key-value pair in a properties file is translated into the desired language Statement 2 : The keys in a properties file are always in the English language.
1 A Only 2 is true
1 Both 1 and 2 are false
2 C Only 1 is True
1 Both 1 and 2 are True
14 Which of these components reside on the server side of an RMI application ?
Trang 1720 The URL string is made up of the and parts
A Resource Locator,Uniformity Checker
Trang 18B Resource Locator, Protocol Identifier
C Protocol Decoder, Resource Name
D Protocol Identifier, Resource Name
21 The constructions of the URL class throw a …… if no protocol is specified
24 Arrange the steps to use the MessageFormat class in the correct sequence
1 Create a MessageFormat instance
2 Identify the variable in the message.
3 Apply and format the pattern using the MessageFormatinstance
4 Create a template
5 Create an object array for containing the variable arguments.
1 1,2,3,4,5
2 2,4,1,5,3
Trang 193 C 2,4,5,1,3
1 4,1,2,5,3
25 Which of the following statements are true about Swing ?
1 Swing Buttons and Labels can display images in addition to textual captions
2 Border drawn around most of the Swing components can be changed.
3 The MVC architecture does not allow to represent and perform the components functionality.
4 Swing is based on the Model-View-Controller Architecture
Trang 201 Set the content types of the message
2 Set the content of the message
3 Set the Attributes required
4 Create an empty message object from a session
4,3,1,2
31 Which of the following are the methods of JScrollPaneclass ?
1 public void setCorner(String key, Component corner)
2 public void setHorizontalScrollBarPolicy(String key)
1 3 public void setVerticalScrollBarPolicy(int policy)
Trang 212 4 public void setHorizontalScrollBarPolicy(int policy)
3 public void setVerticalScrollBarPolicy(int key)
D protected nested class
35 java.util.locale class object represents a specific geographical ,political, cultural region.Which of the following are valid constructor for the Locale
1.public Locale()
2.public Locale(String country)
3.public Locale(String language)
4.public Locale(String language,String country)
5.public Locale(String country,String language)
1 1,5
2 2,3,4
1 C 3,4
1 2,5
Trang 2236 Which of the following protocols is not used for sending and receiving email ?
1 Java Virtual Machine
2 Remote Method Invocation
38 The class is used to convert sentences from one locale to another without introducing grammatical errors
Trang 232 application
3 I/O
40 Identify the correct statements with JList ?
Statement 1 : A JList does not support scrolling inherently Statement 2 : A JList allows you to choose only one item.