Trivia Quiz On Distributed Computing In Java

Reviewed by Editorial Team
The ProProfs editorial team is comprised of experienced subject matter experts. They've collectively created over 10,000 quizzes and lessons, serving over 100 million users. Our team includes in-house content moderators and subject matter experts, as well as a global network of rigorously trained contributors. All adhere to our comprehensive editorial guidelines, ensuring the delivery of high-quality content.
Learn about Our Editorial Process
| By Vietha
V
Vietha
Community Contributor
Quizzes Created: 11 | Total Attempts: 9,911
| Attempts: 607 | Questions: 65
Please wait...
Question 1 / 65
0 %
0/100
Score 0/100
1. If an error occurs when creating a socket an IOException is thrown.

Explanation

When creating a socket, various errors can occur such as network issues, invalid arguments, or a failure to establish a connection. In Java, these errors are represented by IOException, which is a checked exception. This means that if any error occurs during socket creation, the code must handle or declare this exception. Therefore, the statement "If an error occurs when creating a socket an IOException is thrown" is true.

Submit
Please wait...
About This Quiz
Trivia Quiz On Distributed Computing In Java - Quiz

Java is a programming language that is used by most of the techies. This language can be used in different platforms and is quite easy to understand, write,... see moreand debug when compared to others. Below is a trivia quiz that is designed to test your understanding of distributing computing in Java language. Give it a try and see if you get it! see less

2. This is responsible for determining whether the component should react to any input events from input devices such as the keyboard or mouse.

Explanation

The controller is responsible for determining whether the component should react to any input events from input devices such as the keyboard or mouse. It acts as the intermediary between the view and the model, receiving input from the user and updating the model accordingly. In this case, the controller decides how the component should respond to input events and triggers the appropriate actions or updates.

Submit
3. If the host does not exist,  the Constructor Socket(String host,int port); will throws .........

Explanation

The Constructor Socket(String host,int port); will throw an UnknownHostException if the host does not exist. This exception is thrown when the IP address of the host cannot be determined or if the host name is invalid. It indicates that the host is not recognized or cannot be reached, causing the connection to fail.

Submit
4.  This supports a technology called 'pluggable-Look-And-Feel' where components can be displayed as on any operating system.

Explanation

This answer is correct because the statement mentions a technology called 'pluggable-Look-And-Feel' which allows components to be displayed as on any operating system. The options provided - Windows, Mac OS X, and GTK+ - are all operating systems that support this technology, allowing components to be displayed with their respective look and feel. The option "None" is incorrect as it does not support the mentioned technology.

Submit
5. This is a Component which lets the user to select a numberic value within a bounded range.

Explanation

A JSlider is a component that allows the user to select a numeric value within a bounded range. It provides a graphical representation of the range with a draggable thumb that can be moved along the track to select a desired value. This makes it suitable for scenarios where the user needs to choose a value within a specific range, such as setting a volume level or selecting a value on a scale. JRadioButton, JButton, and JPanel are not specifically designed for selecting numeric values within a range, making JSlider the correct answer.

Submit
6. An Icon can be added as a corner component to the JScrollPane.

Explanation

The statement is stating that it is possible to add an icon as a corner component to the JScrollPane. This means that users can customize the appearance of the scroll pane by adding an icon in one of the corners.

Submit
7. This method is used to add a vertically long component as the row header. the components scroll up and down when the vertical scrolling.

Explanation

The answer includes three terms: JScrollPane, JFC, and Oracle. JScrollPane is a method used to add a vertically long component as the row header. It allows components to scroll up and down when there is vertical scrolling. JFC stands for Java Foundation Classes, which is a set of GUI classes and components for building Java applications. Oracle is a multinational computer technology corporation that develops and provides the Java programming language.

Submit
8. Which Statement is true?

Explanation

The correct answer is "JSlider sl; sl = new JSlider(SwingConstants.VERTICAL,0,255,0);". This is the correct way to create a new JSlider object with the specified parameters. The SwingConstants.VERTICAL constant is used to set the orientation of the slider to vertical, and the values 0, 255, and 0 represent the minimum, maximum, and initial values of the slider respectively.

Submit
9. Event handling of JTextField are:

Explanation

The correct answer is "addFocusListener(new FocusListener(){ public void focusGained(FocusEvent fe){ } public void focusLost(FocusEvent ev){ } });". This is the correct answer because it shows the correct syntax for adding a focus listener to a JTextField. The focus listener is used to handle events when the JTextField gains or loses focus. The code provided correctly implements the focusGained and focusLost methods, which will be executed when the corresponding events occur.

Submit
10. This is a protocol that sends independent package of data, called datagrams, from one computer to another with no quarantee about its transmission. it is not connect - based protocol.

Explanation

UDP (User Datagram Protocol) is a protocol that sends independent packets of data, called datagrams, from one computer to another with no guarantee of its transmission. Unlike TCP (Transmission Control Protocol), UDP is not a connection-based protocol. It is commonly used for applications that require fast and efficient transmission of data, such as streaming media, online gaming, and DNS (Domain Name System) queries. UDP does not provide error checking or retransmission of lost packets, making it less reliable but faster than TCP.

Submit
11. These components do not have their peer-components equivalent as compared to AWT components.

Explanation

Lightweight components refer to the components in Swing, which is a successor to AWT. These components do not have their peer-components equivalent in AWT. In AWT, the components are heavyweight, meaning they are dependent on the underlying operating system's windowing system. On the other hand, Swing components are lightweight, as they are rendered entirely by Java code. Therefore, the given answer is correct in stating that lightweight components do not have their peer-components equivalent in AWT.

Submit
12. Any valid number, uses Character.isDigit.  in MaskFormatter class

Explanation

The correct answer is "#". In the given question, it is stated that any valid number uses the Character.isDigit() method in the MaskFormatter class. The "#" symbol is commonly used in formatting patterns to represent any digit. Therefore, the answer "#" is correct as it represents a valid number in the context of the question.

Submit
13. This is used to create a GUI-based application. It is available in the javax.swing package.

Explanation

JFrame is the correct answer because it is a class in the javax.swing package that is used to create a GUI-based application. It provides a window for the application and contains various methods and components for creating a graphical user interface. JFrame is commonly used as the main container for GUI applications and allows developers to add and arrange other components such as buttons, labels, and text fields.

Submit
14. Which statement is true?

Explanation

The correct answer is the first option: JSlider SL; SL.addChangeListener(new ChangeListener(){ public void stateChanged(ChangeEvent e){ // ction Code; } }); The reason this is the correct answer is because it correctly uses the addChangeListener() method to add a ChangeListener to the JSlider component. The ChangeListener is implemented as an anonymous inner class, and the stateChanged() method is overridden to define the desired action code. The other options either have incorrect method names (statechanged() instead of stateChanged()) or incorrect parameter names (Changeevent instead of ChangeEvent), which would result in compilation errors.

Submit
15. If you have a slider with the range 0 to 20 and major tick spacing set to 10, then you you will get at 0,10, and 20. So that Method is:

Explanation

The given correct answer is "public void setMajorTickSpacing(int spacing)". This method is used to set the spacing between major ticks on the slider. In this case, the major tick spacing is set to 10, so the slider will have ticks at positions 0, 10, and 20.

Submit
16. TCP (Transmission Control Protocol) includes:
- 3 choices

Explanation

TCP (Transmission Control Protocol) is a widely used protocol in computer networking. It ensures reliable and ordered delivery of data packets between devices over a network. The given answer includes the correct ports associated with specific protocols. Port 20 and Port 21 are used for FTP (File Transfer Protocol), which is commonly used for transferring files between a client and a server. Port 23 is used for Telnet, a protocol that allows remote access to a device's command-line interface. Port 25 is used for SMTP (Simple Mail Transfer Protocol), which is responsible for sending email messages between servers.

Submit
17. This depicts the graphical part on the screen.It takes the data and various states from the Other part to render the component's graphical part.

Explanation

The given correct answer is "View". In the context of software development, the View is responsible for the graphical part on the screen. It takes data and various states from the Model and Controller to render the component's graphical part. The View is responsible for displaying the user interface and presenting information to the user.

Submit
18. This class is used to display a group of items.It allows you to choose one or more items., Items can be displayed in one or more columns.

Explanation

JList is the correct answer because it is a class in Java Swing that is used to display a group of items. It allows the user to choose one or more items from the list. The items in the list can be displayed in one or more columns. JComboBox is used to create a drop-down list of items, while JTextArea is used to create a multi-line text input area.

Submit
19. This is a Java program which is meant to run as a part of a web page.

Explanation

This Java program is designed to run as a part of a web page. JApplet is a class in Java that allows you to create applets, which are small applications that can be embedded within a web page. Therefore, using JApplet would be the correct choice for running this program as a part of a web page.

Submit
20. Which Statements are true?

Explanation

A Timer can be configured to fire events repeatedly because it is designed to schedule and execute tasks at specified intervals. By setting the initial delay and interval, the Timer can repeatedly fire ActionEvents at the specified time intervals. This allows for repetitive actions or tasks to be performed automatically without the need for manual intervention.

Submit
21. This layout manager allows you to stack components one behind another.

Explanation

CardLayout is a layout manager that allows you to stack components one behind another. It is useful when you want to switch between different components, such as displaying different panels or cards in a container. Each component is added to the layout with a unique name, and you can easily switch between them using methods like next() or show(). This layout manager is commonly used in GUI applications where you need to display different views or screens based on user interactions.

Submit
22. This Method is used to add a horizontally long component as the column header.

Explanation

JScrollPane is a Java Swing component that provides a scrollable view of a component. It is commonly used to add scrolling functionality to components that are too large to fit within a container. In this case, the method mentioned is used to add a horizontally long component as the column header. This means that the JScrollPane is being used to display a component horizontally, such as a table or a list, as the header of a column.

Submit
23. Any hex character (0-9, a-f or A-F).

Explanation

The given question asks for a hex character, which can be any character from the range 0-9, a-f, or A-F. However, the correct answer states "None of above," indicating that none of the options provided (1 and 2) are hex characters.

Submit
24. Any character (Character.isLetter). All lowercase letters are mapped to upper case.  in MaskFormatter class.

Explanation

The given correct answer is "U" because in the MaskFormatter class, all lowercase letters are mapped to uppercase. This means that if any lowercase letter is entered as a character, it will be automatically converted to its uppercase equivalent.

Submit
25. Which statements are true?
- 2 choices

Explanation

The first statement is true because port numbers ranging from 0 to 1023 are indeed reserved for well-known services and protocols. The second statement is false because the physical connection is not logically numbered within a range of 0 to 65500. The third statement is true because the destination address in networking identifies the computer or device that the data is being sent to.

Submit
26. Lightweight components includes:
- 3 choices

Explanation

The correct answer includes JCheckBox, JRadioButton, JButton, JPasswordTextField, and JLabel. These components are considered lightweight because they are implemented entirely in Java and do not rely on the underlying operating system. They are more efficient in terms of memory usage and performance compared to heavyweight components, which are dependent on the operating system for rendering.

Submit
27. Any character (Character.isLetter). All upper case letters are mapped to lower case.

Explanation

The given explanation suggests that the letter "L" remains unchanged because it is already in its lowercase form.

Submit
28. JList can be supported scrolling inherently by JScrollPane as JComboBox

Explanation

The given statement is false. While JScrollPane can support scrolling for JList, JComboBox cannot inherently support scrolling. JScrollPane is specifically designed to provide a scrollable view for components like JList, JTable, and JTextArea. However, JComboBox is a drop-down list that displays a single item at a time and does not have built-in scrolling functionality.

Submit
29. Marshalling

Explanation

Marshalling refers to the process of converting data into a format that can be transmitted over a network or stored in a file. This involves transforming the data into a standardized on-the-wire format, which ensures compatibility and interoperability between different systems. By converting the data into on-the-wire format, it becomes easier to transmit and receive the data across different platforms and network protocols.

Submit
30. Which statements are true?
- 3 choices

Explanation

The given answer is correct because it accurately states that TCP is a connection-based protocol that ensures reliable data flow between two computers. It also correctly mentions that Java provides the java.net package, which includes the necessary classes for system-independent network communications. Additionally, it correctly states that TCP guarantees the successful reception of data sent from one end of the connection to the other.

Submit
31. This layer is responsible for setting up connections using sockets.It listens for incoming calls, and manages requests from remote reference layer

Explanation

The Transport Protocol Layer is responsible for setting up connections using sockets and managing requests from the remote reference layer. It listens for incoming calls and ensures the reliable delivery of data between the communicating systems. This layer handles the segmentation and reassembly of data, as well as error detection and correction. It provides end-to-end communication services and ensures the proper flow control and congestion control mechanisms are in place.

Submit
32. Which statements are true?
- 3 choices

Explanation

The given answer is correct because it accurately identifies the statements that are true. The java.rmi.Remote interface is used to distinguish interfaces that are non-remote. A RMI application must expose methods that remote clients can invoke. The java.rmi.Remote interface is a marker interface.

Submit
33. Event handling of JTextArea is:

Explanation

The correct answer is "addActionListener(new ActionListener(){ public void actionPerformed(ActionEvent ev){ } });". This is because JTextArea does not have a built-in action event, so in order to handle events when the user interacts with the JTextArea, an ActionListener needs to be added. The actionPerformed method within the ActionListener is where the code for handling the event should be written.

Submit
34. This is as part of its view provides four corners where you can add components.

Explanation

The JScrollPane is the correct answer because it is a component in Java Swing that provides a scrollable view of a component. In this case, the question mentions that "it" (referring to something not specified) provides four corners where you can add components. The JScrollPane has four corners where you can add components, allowing you to customize the scrollable view as needed.

Submit
35. Which a three layered architecture is based on?

Explanation

The correct answer is the Stub and Skeleton Layer, Remote Reference Layer, and Transport Protocol Layer. The three-layered architecture is based on these layers which are responsible for different functionalities. The Stub and Skeleton Layer handles the communication between the client and server by generating stubs and skeletons. The Remote Reference Layer manages the remote object references and handles the object communication. The Transport Protocol Layer ensures the reliable delivery of messages between the client and server using various protocols.

Submit
36. This class is both a container and a components.

Explanation

The correct answer is JPanel because it is a class in Java that can act as both a container and a component. It can be used to group other components together and also be added to other containers. This makes it a versatile class for creating user interfaces in Java applications.

Submit
37. Which statements are true?
- 3 choice

Explanation

A JDialog is a top-level container means that it can be displayed independently of any other window or frame. The container being physically constrained with the max size offered by the screen on which it displays means that it cannot exceed the maximum size of the screen. To return the parent, it is required to close the modal dialog means that in order to access the parent window or frame, the modal dialog needs to be closed first.

Submit
38. Valid values of orientation in Method of JSlider are:
-2 choices.

Explanation

The valid values for the orientation parameter in the Method of JSlider are SwingConstants.HORIZONTAL and SwingConstants.VERTICAL. The SwingConstants class provides constants for specifying the orientation of components in Swing. In this case, the setOrientation method is used to set the orientation of the JSlider. The answer includes the correct values, SwingConstants.HORIZONTAL and SwingConstants.VERTICAL.

Submit
39. This is a Java object associated with a container which governs the placement and size of the component.

Explanation

A layout manager is a Java object that is associated with a container and controls the placement and size of the components within that container. It determines how the components are arranged and displayed on the user interface. Different layout managers have different rules for positioning and resizing components. In this context, the correct answer is "Layout Manager" as it accurately describes the Java object responsible for managing the layout of components within a container.

Submit
40. Any character (Character.isLetter).

Explanation

The correct answer is "?" because the given statement "Any character (Character.isLetter)" implies that the answer can be any character that is a letter. Since "?" is a letter, it satisfies the condition and is therefore the correct answer.

Submit
41. Transport Layer

Explanation

The correct answer is "Set connection." In the context of the Transport Layer, setting a connection refers to the establishment of a logical connection between two endpoints. This connection allows for the reliable transmission of data between the sender and receiver. Once the connection is established, data can be transmitted and received efficiently and securely. The other options mentioned in the question, such as converting data into on-the-wire format and converting on-the-wire format into data, are also important functions of the Transport Layer but are not specifically related to setting a connection.

Submit
42. The setRowHeaderView() method is used to add horizontally long component.

Explanation

The setRowHeaderView() method is actually used to add a component that will be displayed in the row header of a JScrollPane. It is not specifically used for adding horizontally long components. Therefore, the given statement is false.

Submit
43. Container components are:
3 choices

Explanation

Container components are components that can contain other components. They provide a way to organize and manage the layout of other components within them. In this case, the correct answer includes JPanel, JFrame, and JApplet. JPanel is a lightweight container that is commonly used to group and organize other components. JFrame is a top-level container that represents a window in a GUI application. JApplet is a container specifically designed for creating applets, which are small applications that run within a web browser. JTextField, on the other hand, is not a container component but rather a text input component.

Submit
44. Which statements are true?

Explanation

The MessageFormat class can be used to create a compound message. This means that it allows for the creation of messages that contain dynamic elements, such as variables or placeholders, that can be replaced with actual values at runtime. This is useful for situations where the message needs to be customized or personalized based on specific data or conditions.

Submit
45. Event Handling of JComboBox is :
- 2 choices

Explanation

The correct answer is ActionListener() Vs actionPerformed(),addActionListener.

This is because the JComboBox component in Java Swing allows users to select an item from a drop-down list. To handle events related to the JComboBox, we need to use an ActionListener interface and its corresponding actionPerformed() method. This method is called when the user selects an item from the JComboBox. To register the ActionListener with the JComboBox, we use the addActionListener() method. Therefore, the correct answer is ActionListener() Vs actionPerformed(),addActionListener.

Submit
46. The language code consisting of two or more letters in Lower case and the country code consisting of two letter in uper case.

Explanation

The statement is false because the language code consists of two or more letters in lower case, but the country code consists of two letters in upper case.

Submit
47. Which statements are true?
- 3 choices

Explanation

The first statement is true because MVC Architecture was indeed first introduced in SmallTalk. The second statement is true because the model represents the data and not the view of the components. The third statement is true because the controller is responsible for reacting to user inputs from the keyboard and mouse. The fourth statement is false because the view represents the components and not the data. The fifth statement is true because separable architecture combines the view and controller.

Submit
48. MVC Architecture decomposes components:

Explanation

The correct answer is MVC: Model View Controller. MVC architecture decomposes components by separating the application into three interconnected components: the model, which represents the data and business logic, the view, which represents the user interface, and the controller, which handles user input and updates the model and view accordingly. This separation of concerns allows for easier maintenance, reusability, and scalability of the application.

Submit
49. Common Methods of JScroPanel class are:
-3 choices.

Explanation

The correct answer is public void setCorner(String key, component corner), public void setHorizontalScrollBarPolicy(int policy), public void setVerticalScrollBarPolicy(int policy). These methods are commonly used in the JScroPanel class. The setCorner method is used to set the corner component for a specific key in the scroll pane. The setHorizontalScrollBarPolicy method is used to set the horizontal scroll bar policy, determining when the horizontal scroll bar should be displayed. The setVerticalScrollBarPolicy method is used to set the vertical scroll bar policy, determining when the vertical scroll bar should be displayed.

Submit
50. Which components are Top-Level controller.
- 3 choices

Explanation

The top-level controllers in this scenario are JFrame, JApplet, and JDialog. These components are responsible for providing the main window or container for the user interface. JFrame is a window that can be resized, maximized, and closed. JApplet is a window that is embedded within a web browser. JDialog is a window that is typically used for displaying dialog boxes or pop-up windows. JPanel and JDesktopPane are not top-level controllers as they are used as containers within these top-level components.

Submit
51. Stub and Skeleton Layer:

Explanation

The stub and skeleton layer is responsible for transmitting and receiving data between the client and the server. This layer handles the conversion of data into the on-the-wire format, which is the format used for transmission over the network. It also converts the received on-the-wire format back into data that can be used by the application. Additionally, this layer is responsible for invoking remote methods on the server.

Submit
52. The root panel has four parts :

Explanation

The root panel in this question has four parts: Glass Panel, Content Panel, Layered Panel, and Menu Bar. These components are typically used in graphical user interfaces to provide different functionalities. The Glass Panel is a transparent panel that can be used to overlay other components. The Content Panel is the main area where the application's content is displayed. The Layered Panel is used to layer components on top of each other. And finally, the Menu Bar provides a set of menus and options for the user to interact with the application.

Submit
53. Which statements are true?
- 4 choices

Explanation

The getCurrencyInstance() method returns an instance of the NumberFormat class that is initialized with the specified locale. This means that the formatting of currency values will be based on the conventions of the specified locale. The method does not only accept primitive data types as arguments, but it can also accept an instance of the Locale class. The statement about date and time format not needing to conform to the end user's locale is also true. Lastly, formatting the captions of GUI components ensures that the application's look and feel is sensitive to the locale.

Submit
54. Which Statements are true?
- 2 choices.

Explanation

The first statement is false because the constructor public JPasswordField("password") does not exist. The second statement is true because JTextField allows the user to input a single line of text. The third statement is true because the method setEditable(false) does not allow you to edit the text. The fourth statement is false because JTextArea does allow you to edit the text. The fifth statement is true because the text in the JTextArea can be set programmatically.

Submit
55. Which statements are true?

Explanation

The answer is correct because it accurately identifies the true statements among the given options. It states that successful translation of the source files in the desired language is very difficult, which is true because translation requires linguistic and cultural understanding. It also states that internationalized software should be developed such that it can be adapted without engineering changes, which is true because it allows for easy localization. Lastly, it mentions that internationalization is the process of designing an application so that it can adapt to various languages and cultures, which is true as internationalization involves making software flexible and adaptable.

Submit
56. Which statements  are True?

Explanation

To communicate with the client, a server must retrieve the InputStream and OutputStream from the proxy socket object. The accept() method in the ServerSocket class is a blocking method, meaning it will wait until a client requests a connection. Once the accept method is invoked, it will continue to wait until a client request is received. However, there is no method called clientAccept() in the ServerSocket class.

Submit
57. Event handling of JCheckBox are:

Explanation

The correct answer is to use the "addItemListener" method to add an ItemListener to the JCheckBox. This method allows you to listen for changes in the state of the checkbox, such as when it is selected or deselected. The provided code correctly creates an anonymous inner class that implements the ItemListener interface and overrides the "itemStateChanged" method. This method will be called whenever the state of the checkbox changes. The other two options, addActionListener and addFocusListener, are not relevant for handling events of a JCheckBox.

Submit
58. Which statements are true?
-  2 choices

Explanation

The first statement is false because the translation of text is not necessarily the least time-consuming part of the localization process. Other tasks such as adapting graphics, currency formats, and date formats can also be time-consuming.

The second statement is true because localization is indeed the process of adapting software for a specific region. This includes translating text, adapting graphics, adjusting formats, and considering cultural differences.

The third statement is true because textual elements are typically stored outside the source code, often in separate resource files, and retrieved dynamically during runtime.

The fourth statement is false because textual elements such as labels and messages for GUI components are usually not hard-coded in the program. Instead, they are stored separately and retrieved dynamically.

The fifth statement is false because adding support for new languages does not necessarily require recompilation. With proper design and internationalization practices, language support can be added without recompiling the entire program.

Submit
59. Which statement are true?
- 2 choices

Explanation

The first statement is false because the String class in Java does provide methods to convert between standard encoding systems and the Unicode system.

The second statement is false because Unicode is actually a 16-bit character encoding system, not 32-bit.

The third statement is true as Unicode assigns a unique number to every character, regardless of the platform, program, or language.

The fourth statement is false because Java does use Unicode as its native character encoding.

The fifth statement is true as the primitive data types in Java, such as char, are based on Unicode encoding.

Submit
60. Which statements are true?
- 3 choices

Explanation

The glass panel is a transparent panel that is used to block user input to the underlying components. It is hidden by default, meaning that it is not visible and does not block any user input.

A layered panel is a container that can hold components in a specified Z order, allowing for overlapping components. This is useful for creating complex user interfaces with multiple layers of components.

The object reference of a content panel can be retrieved using the getContentPanel() method. This method allows access to the content panel, which is the main container for holding components in a JFrame or JDialog.

Therefore, the correct statements are: Glass panel is hidden by default, Layered panel can hold components in specified Z order, and The object reference of a content panel is retrieved using the getContentPanel() method.

Submit
61. Which statements are true?

Explanation

The JFC (Java Foundation Class) includes 2D graphics support, allowing developers to create and manipulate 2D graphics in their Java applications. Additionally, the JFC is a graphical framework, providing a set of classes and components for building graphical user interfaces (GUIs) in Java. These statements are true and accurately describe the features and purpose of the JFC.

Submit
62. Event Handling of JList are:
- 3 choices.

Explanation

The correct answer is ListSelectionListener, valueChanged(); method, addListSelectionListener(). JList is a Swing component in Java that displays a list of items. To handle events related to JList, we can use the ListSelectionListener interface. This interface provides the valueChanged() method which is called whenever the selection in the JList changes. To register the ListSelectionListener with the JList, we use the addListSelectionListener() method. Therefore, ListSelectionListener, valueChanged(); method, and addListSelectionListener() are the correct choices for event handling of JList.

Submit
63. Which methods is used for registering listener-objects of JCheckBox ?

Explanation

The correct answer is AddActionListener(); and AddItemListener();. These methods are used for registering listener-objects of JCheckBox. The AddActionListener() method is used to register an ActionListener, which is invoked when the checkbox is selected or deselected. The AddItemListener() method is used to register an ItemListener, which is invoked when the state of the checkbox changes. By using these methods, listener-objects can be registered to perform specific actions based on the checkbox events.

Submit
64. Which statements are true?
- 3 choices

Explanation

The first statement is true because all remote methods declared in a remote interface should be qualified to throw java.rmi.RemoteException, as it is a checked exception required by the RMI system.

The second statement is false because only methods from remote interfaces are available for clients to invoke. Methods from non-remote interfaces are not accessible to clients.

The third statement is true as the rmiregistry.exe application is commonly found in the bin directory of the Java home directory, where it is used to start the RMI registry.

The fourth statement is false because the remote interface does not extend from java.Remote interfaces. It extends from the java.rmi.Remote interface.

The fifth statement is true as remote clients can only invoke remote methods, they cannot directly invoke methods on objects that are not remote.

Submit
65. Which statements are true?

Explanation

The first statement is false. The JPanel is a component, not a container. A container is a component that can contain other components, such as a JFrame or a JApplet.

The second statement is false. The setSize() method sets the size of a component, not necessarily a JFrame. It does not bring a JFrame into a realized state.

The third statement is true. By default, the close operation of a frame is not functional. This means that clicking the close button on the frame will not close the frame unless you explicitly set the default close operation using the setDefaultCloseOperation() method.

The fourth statement is true. Applets are used to make web pages more dynamic by adding interactive content, such as animations, games, or interactive forms.

The fifth statement is false. The stop() method of JApplet is invoked multiple times throughout the lifetime of the applet, not just once. It is called when the applet is stopped or when the web page that contains the applet is closed.

Submit
View My Results

Quiz Review Timeline (Updated): Mar 21, 2023 +

Our quizzes are rigorously reviewed, monitored and continuously updated by our expert board to maintain accuracy, relevance, and timeliness.

  • Current Version
  • Mar 21, 2023
    Quiz Edited by
    ProProfs Editorial Team
  • Dec 16, 2008
    Quiz Created by
    Vietha
Cancel
  • All
    All (65)
  • Unanswered
    Unanswered ()
  • Answered
    Answered ()
If an error occurs when creating a socket an IOException is thrown.
This is responsible for determining whether the component should react...
If the host does not exist,  the Constructor Socket(String...
 This supports a technology called...
This is a Component which lets the user to select a numberic value...
An Icon can be added as a corner component to the JScrollPane.
This method is used to add a vertically long component as the row...
Which Statement is true?
Event handling of JTextField are:
This is a protocol that sends independent package of data, called...
These components do not have their peer-components equivalent as...
Any valid number, uses Character.isDigit.  in MaskFormatter class
This is used to create a GUI-based application. It is available in the...
Which statement is true?
If you have a slider with the range 0 to 20 and major tick spacing set...
TCP (Transmission Control Protocol) includes:- 3 choices
This depicts the graphical part on the screen.It takes the data and...
This class is used to display a group of items.It allows you to choose...
This is a Java program which is meant to run as a part of a web page.
Which Statements are true?
This layout manager allows you to stack components one behind another.
This Method is used to add a horizontally long component as the column...
Any hex character (0-9, a-f or A-F).
Any character (Character.isLetter). All lowercase letters are mapped...
Which statements are true?- 2 choices
Lightweight components includes:- 3 choices
Any character (Character.isLetter). All upper case letters are mapped...
JList can be supported scrolling inherently by JScrollPane as...
Marshalling
Which statements are true?- 3 choices
This layer is responsible for setting up connections using sockets.It...
Which statements are true?- 3 choices
Event handling of JTextArea is:
This is as part of its view provides four corners where you can add...
Which a three layered architecture is based on?
This class is both a container and a components.
Which statements are true?- 3 choice
Valid values of orientation in Method of JSlider are:-2 choices.
This is a Java object associated with a container which governs the...
Any character (Character.isLetter).
Transport Layer
The setRowHeaderView() method is used to add horizontally long...
Container components are:3 choices
Which statements are true?
Event Handling of JComboBox is :- 2 choices
The language code consisting of two or more letters in Lower case and...
Which statements are true?- 3 choices
MVC Architecture decomposes components:
Common Methods of JScroPanel class are:-3 choices.
Which components are Top-Level controller.- 3 choices
Stub and Skeleton Layer:
The root panel has four parts :
Which statements are true?- 4 choices
Which Statements are true?- 2 choices.
Which statements are true?
Which statements  are True?
Event handling of JCheckBox are:
Which statements are true?-  2 choices
Which statement are true?- 2 choices
Which statements are true?- 3 choices
Which statements are true?
Event Handling of JList are:- 3 choices.
Which methods is used for registering listener-objects of JCheckBox ?
Which statements are true?- 3 choices
Which statements are true?
Alert!

Advertisement