You are on page 1of 4

1 .Which method is used to select multiple items programmatically? A.

setSelectedIndices(int[] indices) // chn nhiu item da vo mng index a vo (true) B. setSelectedInde int index) // chn item vi index c a vo (false) C. setListData(Object[] items) // a mt mng item vo component (false) D. setSelectedInde int[] indices)// khng c hm ny

2 .Whenever you select an item from the combo box the ______________ method of ItemListener is invoked. A. itemSelected() B. isSelected() C. itemAdded() D. itemStateChanged() // interface ItemListener ch c duy nht mt hm ny (true) 3 .A __________ is a component which displays its data in a hierarchical way. A. JTable B. JTree // true c. JMenuList D. JMenuItem 4. The process of creating an application that can adapt to a language or a country by adding locale specific components which help in translation of text is referred as __________. A. Translation B. Internationalization // true C. Standardization D. Localization 5 ._____________ provides a unique number for every character irrespective of platform, program or language. A. ByteCode B. ASCII Encoding C. Unicode // true 6. The currency of a particular country can be displayed in the correct format using the ___________ class. A. MessageFormat B. NumberFormat // true C. CountryFormat D. Locale 7 . The _________ class is used to convert sentences from one locale to another without introducing grammatical errors.

A. MessageFormat // true , khng chc lm B. NumberFormat C. CountryFormat D. Locale 8 .The constructors of the URL class throw a __________ if no protocol is specified. A.NullPointerException B.InvalidArgumentException C.MalformedURLException // true D.InvalidProtocolException 9 .The _______ method of the URL class returns the IP address enclosed in square brackets. A.getFile() B.getIP() C.getHost() // true D.getPath() 10 Instances of the ______ class can be used to read from and write to the resource referred by the URL. A.URL B.InetAddress C.Connection D.URLConnection // true 11 An instance of the Socket class represents the _________ side of the connection. A.server B.client // true, maybe C.application D.I/O 12 A ServerSocket instance binds itself to a __________ and then waits and listens for client requests to establish connections. A.port // true B.socket C.IP address D.URLConnection 13 A ________ is a class used to represent a menu on a menu bar. A.JMenuBar B.JMenu // true C.MenuBar

D.JMenuItem 14 A __________________ is similar to a JMenuItem with the additional feature of selecting and deselecting them. A.JCheckBoxMenuItem // true B.JCheckBoxMenu C.JMenuItem D.JMenuList 15 Swing provides the _____________________________ class to create filters. A.javax.swing.FileFilter B.javax.swing.filechooser.Filter C.javax.swing.filechooser.FileFilter // true 16 A __________ is dockable only if the container it belongs to has a BorderLayout layout manager. A.JToolBar // true maybe B.JMenuBar C.JCheckBoxMenuItem D.JMenu 17 The __________ method is used to make the toolbar dockable. A.setFloatable() // true B.setDockable() C.setDock() D.setToolDockable() 18 The _____________ package has a class Color to create objects representing colours and their shades. A.javax.swing B.java.awt // true C.java.awt.colorchooser D.javax.swing.colorchooser 19 The JColorChooser has a method __________________ which returns an object of the ColorSelectionModel interface. A.getSelectedModel() B.getModelSelection() C.getSelectionModel() // true D.getSelection() 20 ____________ is a class used to display a group of items.

A.JList // true B.JMenuList C.JMenuItem D.JFileChooser

You might also like