Danh mục

Bài thi java

Số trang: 6      Loại file: docx      Dung lượng: 14.67 KB      Lượt xem: 10      Lượt tải: 0    
tailieu_vip

Xem trước 2 trang đầu tiên của tài liệu này:

Thông tin tài liệu:

Tài liệu tham khảo rất hữu ích cho các bạn học sinh sinh viên đại học, củng cố nâng cao kiến thức vể java học là hành trang giúp ban hoàn thành môn lập trình java. Chúc các bạn thành công
Nội dung trích xuất từ tài liệu:
Bài thi java1) The exportObject() method belong to thea. locate register classb. naming classc. unicastRemoteObject class – R***2) the ... method of the unicastremoteobject class is used to remove theremote object froma. object()b. unexportobject() – R***c. unimportobject()3) the...method of the session class is used to retrieve the default sessiona. getdefaultInstance() – R*** < Lay Gia Tri Default Cua Sessionb. getinstance() - < Tao New Session Objectc. getproperty()4) the getSize() method of the folder class may not return the exact sizeof the contents if the message hasa. coded cotentsb. encoded contentsc. decoded contents****5) the list() method of naming class is used to retrieve all the namesbound aa. ip address - ...b. rml-registry***c. socket6) the.. method of the serversocket class is used to retrieve the bindingstate of the socketa. isbound() –b. close()R***c. getlnetaddress7) The getcontentlength() method is used toa. retrieve the content length of the resource that is referenced by theURL connection - R****b. returns -1 the content length is knownc. returns 0 if the content length is invalid8) which of the following option helps to set the nimbus look and feelthrough the command line?a) java-dswingdefaultlaf=com.sun.java.swing.plaf.nimbus.nimbuslookandfeel – R///b) java-dswing.defaultlaf=com.sun.java.swing.nimbus.nimbuslookandfeelc) java-dswing.laf=com.sun.java.swing.plaf.nimbus.nimbuslookandfeeld) java-dswing.laf=com.sun.java.swing.nimbus.nimbuslookandfeel9) which of the following method is used to specify automatic gapamong the component and the container?a. setautocreategaps(true)b. setautocreategapsspace(true)c. setautocreatecontainergaps(true)R***d. setAutocreatecomponentgaps(true)10) which of the following method is used to specify the preferred gapbetween a component and the container border?a. addgap().*.b. addpreferredgap()…c. addcomponentgap() - R - ...d. addcontainergap()…11) which of the following code snippets attaches a row fillter to aJtable?a. // CreateTableModel() is//user-defined methodTableModel model = createTableModel();TableRowsorter sorter = new TableRowSorter(model);sorter.setRowFillter(RowFillter.regexFillter(.^A.*)JTable table = new JTable(myModel);table.setRowSorter(sorter);b. createTableModel() is user-//defined methodTableModel model = createTableModel();TableSorter sorter = new TableSorter(model);sorter.setFillter(RowFillter.regexFillter(.^A.*)JTable table = new JTable(myModel);table.setRowSorter(sorter);c. create TableModel() is user-//defined methodTableModel model = createTableModel();TableSorter sorter = new TableSorter(model);sorter.setFillter(RowFillter.regFillter(.^A.*));JTable table = new JTable(myModel);table.setRowSorter(sorter);d. createTableModel() is user-defined // methodTableModel model = createTableModel();TableSorter sorter = new TableSorter(model);sorter.setFillter(RowFillter.regexFillter(.^A.*));JTable table = new JTable(myModel);table.setRowSorter(sorter);12) ...constructor creates a horizontal slider bar with the range 0 to 100and initial value of 50.a. JSlider(int orientation)b. JSlider(int value)***c. JSlider() - Rd. JSlider(int min, int max, int value)13) a ... is similar to a JMenuItem with the additional feature of selectingand deselecting thema. JCheckBoxMenuItem – R***b. JCheckBoxMenuc. JMenuItemd. JMenuList14)The JColorChooser has a method ... which returns an object of theColorSelectionModel interface.a.getSelectedModel()b.getModelSelection()c.getSelectionModel() – R***d.getSelection()15) the server application has to bind the remote object with a ... in theregistrya. referenc---b. name – R*c. remote referenced. entry16) A javax.mail.Session object can be created by invoking the static________ method.a. getInstance() – R***b. getProperties()c. getSession()d. initiateSession()17) A JPopup is more convernient than the standard menus because itinvolves more mouse movementsa. true - Not Sureb. false R***18) The addSeparator() method adds a separator at the ____________ofthe pop-up menua. beginningb. endc. center – R***d. anywhere19) the JFileChooser has which of the following methods ?1. showDialog()2. showSaveDialog()3. showOpenDialog()4. showNewDialog()a. 1 2 3 – R***b. 2 3 4c. 1 3 4d. 1 2 3 420) Which of the following methods of JFileChooser returns an instanceof the File representing the file selected from the dialog box?a. getSelectedFile() – R***b. getCurrentDirectoryc. getFile()d. all of the above21) the... class has methods to parse and convert text to a date.a. SimpleDateFormatb. DateFormatc. DateTimeFormat – R***22) the...class connot be instantilated as it is an abstract classa. URL connectionb. URLc. ServerSocket class***23) the...method is used to retrieve the setting of the connect timeout ofthe URL in millisecondsa. ...

Tài liệu được xem nhiều: