QUESTION AND THERE ANSWER
The Option In The Bold Is The Answer Of The Question
1. Which method is used to select multiple items programmatically?
A. setSelectedIndices(int[] indices)
2. Whenever you select an item from the combo box the ______________ method of ItemListener is invoked.
D. itemStateChanged()
3. A __________ is a component which displays its data in a hierarchical way.
B. JTree
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 __________.
B. Internationalization
5 ._____________ provides a unique number for every character irrespective of platform, program or language.
C. Unicode
6. The currency of a particular country can be displayed in the correct format using the ___________ class.
B. NumberFormat
7 . The _________ class is used to convert sentences from one locale to another without introducing grammatical errors.
A. MessageFormat
8. The constructors of the URL class throw a __________ if no protocol is specified.
C. MalformedURLException
9. The _______ method of the URL class returns the IP address enclosed in square brackets.
B. getIP()
10. Instances of the ______ class can be used to read from and write to the resource referred by the URL.
D. URLConnection
11. An instance of the Socket class represents the _________ side of the connection.
B. client
12. A ServerSocket instance binds itself to a __________ and then waits and listens for client requests to establish connections.
A.port
13. A ________ is a class used to represent a menu on a menu bar.
A. JMenuBar
14. A __________________ is similar to a JMenuItem with the additional feature of selecting and deselecting them.
A. A.JCheckBoxMenuItem
15. Swing provides the _____________________________ class to create filters.
C. javax.swing.filechooser.FileFilter
16. A __________ is dockable only if the container it belongs to has a BorderLayout layout manager.
A. JToolBar
17. The __________ method is used to make the toolbar dockable.
A. setFloatable()
18. The _____________ package has a class Color to create objects representing colours and their shades.
D.javax.swing.colorchooser
19. The JColorChooser has a method __________________ which returns an object of the ColorSelectionModel interface.
C.getSelectionModel()
20. ____________ is a class used to display a group of items.
A. JList
===================================================================================
1. A Local is an identifier for a particular combination of language and region.
A. True
2. The NumberFormat class is used to create locale-specific formats for which of the following?
1. Numbers
2. Currencies
3. Percentages
4. Date
A. 1, 2, 3
3. Which of the following layers in TCP deals with opening and maintaining connections as well as ensures the packets are transmitted and received?
B. II
4. Which of the following is not a layer of RMI architecture?
D. None of the above
5. ___________ is a top-level container.
A. JDialog
6. _________________ constructor creates a horizontal slider bar with the range 0 to 100 and an initial value of 50.
C. JSlider()
7. Which of the following are the advantages of using FlowLayout Manager?
1. Simple to use.
2. Component placed in the center of the container by default.
3. Suitable for JApplet which runs as part of a Web Page.
4. Complex alignment can be easily achieved.
A. 1, 2, 3
8. Which of the following methods is used to set the key combination which invokes the menu item?s action listeners without navigating the menu hierarchy?
C. setAcceletor(KeyStroke keystroke)
9. A JPopupMenu is more convenient than the standard menus because it involves more mouse movements.
B. False
10. The addSeparator() method adds a separator at the ____________of the pop-up menu.
C. Center
11. The JFileChooser has which of the following methods?
1. showDialog()
2. showSaveDialog()
3. showOpenDialog()
4. ShowNewDialog()
A. 1, 2, 3
12. Which of the following methods of JFileChooser returns an instance of the File representing the file selected from the dialog box?
A. getSelectedFile()
13. Which of the following constructors of JToolBar constructs a toolbar with the default horizontal orientation?
A. JToolBar()
14. JList is a class used to display a group of items. The items in a JList can be displayed in one or more columns.
B. False
15. Which of the following selectModes of JList class allows selecting a contiguous item?
C. SINGLE_INTERVAL_SELECTION
16. Which of the following are the important methods of a JComboBox?
1. setEditable()
2. setSelectedIndex()
3. setSelectedItem()
D. 1, 2, 3
17. A JTable has which of the following distinct parts?
1. Column Header
2. Row Header
3. data
C. 1, 3
18. The divider in JSplitPane can be dragged to specify how much of the total area is to be given to a component.
A. True
19. An internationalized and localized program has which of the following benefits?
1. Same executable application can run worldwide.
2. Textual elements for GUI components are not hard-coded in the program.
3. Support for new languages requires only recompilation.
4. Internationalized programs are localized quickly.
D. 1, 2, 3, 4
20. A thread can be created by extending the Thread class. Which of the following methods are defined in the class Thread?
D. wait(), notify() and run()
21. The standard input/output stream in Java is presented by Which of the following fields of the System class?
1. in
2. out
3. sys
4. err
C. 1, 2, 4
22. Which of the following statement is true about threads?
C. Threads are guaranteed to run with the priority that you set using the setPriority() method.
D. Threads inherit their priority from their parent thread.
23. What will be the result of trying to compile and run the expression ((int) (Math.random()*4) ?
A. A negative number might be returned.
24. Which expression will extract the substring ?cas? from the string defined by String str = ?cacaso??
C. str.substring(2, 5)
25. activeCount() method returns the numbere of active threads among the current threads in the program.
26. abs() calculates the absolute value of the int, long, float, or double value passed to it as argument.
The Option In The Bold Is The Answer Of The Question
1. Which method is used to select multiple items programmatically?
A. setSelectedIndices(int[] indices)
2. Whenever you select an item from the combo box the ______________ method of ItemListener is invoked.
D. itemStateChanged()
3. A __________ is a component which displays its data in a hierarchical way.
B. JTree
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 __________.
B. Internationalization
5 ._____________ provides a unique number for every character irrespective of platform, program or language.
C. Unicode
6. The currency of a particular country can be displayed in the correct format using the ___________ class.
B. NumberFormat
7 . The _________ class is used to convert sentences from one locale to another without introducing grammatical errors.
A. MessageFormat
8. The constructors of the URL class throw a __________ if no protocol is specified.
C. MalformedURLException
9. The _______ method of the URL class returns the IP address enclosed in square brackets.
B. getIP()
10. Instances of the ______ class can be used to read from and write to the resource referred by the URL.
D. URLConnection
11. An instance of the Socket class represents the _________ side of the connection.
B. client
12. A ServerSocket instance binds itself to a __________ and then waits and listens for client requests to establish connections.
A.port
13. A ________ is a class used to represent a menu on a menu bar.
A. JMenuBar
14. A __________________ is similar to a JMenuItem with the additional feature of selecting and deselecting them.
A. A.JCheckBoxMenuItem
15. Swing provides the _____________________________ class to create filters.
C. javax.swing.filechooser.FileFilter
16. A __________ is dockable only if the container it belongs to has a BorderLayout layout manager.
A. JToolBar
17. The __________ method is used to make the toolbar dockable.
A. setFloatable()
18. The _____________ package has a class Color to create objects representing colours and their shades.
D.javax.swing.colorchooser
19. The JColorChooser has a method __________________ which returns an object of the ColorSelectionModel interface.
C.getSelectionModel()
20. ____________ is a class used to display a group of items.
A. JList
===================================================================================
1. A Local is an identifier for a particular combination of language and region.
A. True
2. The NumberFormat class is used to create locale-specific formats for which of the following?
1. Numbers
2. Currencies
3. Percentages
4. Date
A. 1, 2, 3
3. Which of the following layers in TCP deals with opening and maintaining connections as well as ensures the packets are transmitted and received?
B. II
4. Which of the following is not a layer of RMI architecture?
D. None of the above
5. ___________ is a top-level container.
A. JDialog
6. _________________ constructor creates a horizontal slider bar with the range 0 to 100 and an initial value of 50.
C. JSlider()
7. Which of the following are the advantages of using FlowLayout Manager?
1. Simple to use.
2. Component placed in the center of the container by default.
3. Suitable for JApplet which runs as part of a Web Page.
4. Complex alignment can be easily achieved.
A. 1, 2, 3
8. Which of the following methods is used to set the key combination which invokes the menu item?s action listeners without navigating the menu hierarchy?
C. setAcceletor(KeyStroke keystroke)
9. A JPopupMenu is more convenient than the standard menus because it involves more mouse movements.
B. False
10. The addSeparator() method adds a separator at the ____________of the pop-up menu.
C. Center
11. The JFileChooser has which of the following methods?
1. showDialog()
2. showSaveDialog()
3. showOpenDialog()
4. ShowNewDialog()
A. 1, 2, 3
12. Which of the following methods of JFileChooser returns an instance of the File representing the file selected from the dialog box?
A. getSelectedFile()
13. Which of the following constructors of JToolBar constructs a toolbar with the default horizontal orientation?
A. JToolBar()
14. JList is a class used to display a group of items. The items in a JList can be displayed in one or more columns.
B. False
15. Which of the following selectModes of JList class allows selecting a contiguous item?
C. SINGLE_INTERVAL_SELECTION
16. Which of the following are the important methods of a JComboBox?
1. setEditable()
2. setSelectedIndex()
3. setSelectedItem()
D. 1, 2, 3
17. A JTable has which of the following distinct parts?
1. Column Header
2. Row Header
3. data
C. 1, 3
18. The divider in JSplitPane can be dragged to specify how much of the total area is to be given to a component.
A. True
19. An internationalized and localized program has which of the following benefits?
1. Same executable application can run worldwide.
2. Textual elements for GUI components are not hard-coded in the program.
3. Support for new languages requires only recompilation.
4. Internationalized programs are localized quickly.
D. 1, 2, 3, 4
20. A thread can be created by extending the Thread class. Which of the following methods are defined in the class Thread?
D. wait(), notify() and run()
21. The standard input/output stream in Java is presented by Which of the following fields of the System class?
1. in
2. out
3. sys
4. err
C. 1, 2, 4
22. Which of the following statement is true about threads?
C. Threads are guaranteed to run with the priority that you set using the setPriority() method.
D. Threads inherit their priority from their parent thread.
23. What will be the result of trying to compile and run the expression ((int) (Math.random()*4) ?
A. A negative number might be returned.
24. Which expression will extract the substring ?cas? from the string defined by String str = ?cacaso??
C. str.substring(2, 5)
25. activeCount() method returns the numbere of active threads among the current threads in the program.
26. abs() calculates the absolute value of the int, long, float, or double value passed to it as argument.
No comments:
Post a Comment