Trivia Quiz On Distributed Computing In Java

65 Questions | Total Attempts: 564

SettingsSettingsSettings
Please wait...
Trivia Quiz On Distributed Computing In Java

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, and 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!


Questions and Answers
  • 1. 
    Which statements are true?- 3 choices
    • A. 

      TCP is a connection-based protocol that provides a reliable flow of data between two computer.

    • B. 

      You do not write programs at the lower level like application, instead you generally program at the transport level.

    • C. 

      Java provides the java.net package which contains all the necessary classes to perform system-independent network communications.

    • D. 

      TCP guarantees that data sent from one end of the connection is received at the other end.

    • E. 

      The first layer in the TCP protocol is the network layer.

  • 2. 
    Which statements are true?
    • A. 

      Once the pattern is applied to the MessageFormat instances, you invoke the getString();

    • B. 

      The MessageFormat class can be used to create a compound message.

    • C. 

      The applyPatern() method is used to fetch an element from the Resource Bundle

    • D. 

      A template is a string, which contained only the fixed part of the message.

    • E. 

      The date and numeric values contained in a message need not to be translated.

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

      View

    • B. 

      Controller

  • 4. 
    Event handling of JTextField are:
    • A. 

      AddFocusListener(new FocusListener(){ public void focusGained(FocusEvent fe){ } public void focusLost(FocusEvent ev){ } });

    • B. 

      AddItemListenner(new ItemListenner(){ public void itemStateChanged(ItemEvent e){ } });

  • 5. 
    Lightweight components includes:- 3 choices
    • A. 

      JPanel, FormattedTextField

    • B. 

      JFrame,

    • C. 

      JCheckBox, JRadioButton

    • D. 

      JButton,JPasswordTextField

    • E. 

      JLabel

  • 6. 
    If an error occurs when creating a socket an IOException is thrown.
    • A. 

      True

    • B. 

      False

  • 7. 
    Event Handling of JComboBox is :- 2 choices
    • A. 

      AddListSelectionListener

    • B. 

      ListSelectionListener Vs valueChanged()

    • C. 

      ActionListener() Vs actionPerformed()

    • D. 

      AddActionListener

  • 8. 
    Which statements are true?- 3 choices
    • A. 

      The java.rmi.Remote interface server to distinguish interfaces which are non remote.

    • B. 

      A RMI application has to expose methods, which remote clients can invoke.

    • C. 

      The java.rmi.Remote is a maker interface.

    • D. 

      The skeleton resides on the client side.

    • E. 

      The stub resides on the server side.

  • 9. 
    If the host does not exist,  the Constructor Socket(String host,int port); will throws .........
    • A. 

      An UnknownHostException

    • B. 

      An IOException

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

      Windows

    • B. 

      Mac OS X

    • C. 

      GTK+

    • D. 

      None

  • 11. 
    TCP (Transmission Control Protocol) includes:- 3 choices
    • A. 

      Port 20 FTP, Port 21 FTP

    • B. 

      Port 161 SNMP

    • C. 

      Port 23 Telnet

    • D. 

      Port 162 SNMP

    • E. 

      Port 25 SMTP

  • 12. 
    Which statements are true?- 2 choices
    • A. 

      The port numbers ranging from 0 to 1023 are reserved

    • B. 

      The physical connection is logically numbered within a range of 0 to 65500

    • C. 

      The destination address identifiers the computer

  • 13. 
    MVC Architecture decomposes components:
    • A. 

      MVC: Model View Controller

    • B. 

      None

  • 14. 
    Which a three layered architecture is based on?
    • A. 

      Stub and Skeleton Layer

    • B. 

      Stub Reference Layer

    • C. 

      Remote Reference Layer

    • D. 

      Transport Reference Layer

    • E. 

      Transport Protocol Layer

  • 15. 
    Which statements are true?
    • A. 

      Internationalized software is developed separately for each country and language.

    • B. 

      Successful translation of the source files in the desired language is very difficult.

    • C. 

      Cost of development of the product in the desired language will be much lower than one time cost.

    • D. 

      Internationalized software should be developed such that it can be adapted without engineering changes

    • E. 

      Internationalization is process of the designing an application so that it can adapt to various.

  • 16. 
    JList can be supported scrolling inherently by JScrollPane as JComboBox
    • A. 

      True

    • B. 

      False

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

      Stub and Skeleton Layer

    • B. 

      Transport Protocol Layer

    • C. 

      Remote Reference Layer

  • 18. 
    Which statements  are True?
    • A. 

      A sever must retrieve the InputStream and OutputStream from the proxy socket object to comunicate with the client.

    • B. 

      When a client requests, the accept() method creates an object of class ServerSocket and return it.

    • C. 

      The accept() method is a blocking method.

    • D. 

      The ServerSocket class has a method clientAccept() for listening to client request.

    • E. 

      The accept method, once invoked, will wait till a client request for a connection.

  • 19. 
    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.
    • A. 

      TCP

    • B. 

      UDP

  • 20. 
    The root panel has four parts :
    • A. 

      Glass Panel,Content Panel

    • B. 

      JPanel

    • C. 

      Layered Panel

    • D. 

      ToolBar Panel

    • E. 

      Menu Bar

  • 21. 
    Which methods is used for registering listener-objects of JCheckBox ?
    • A. 

      AddActionListener();

    • B. 

      AddItemListener();

  • 22. 
    Which statements are true?
    • A. 

      The Java Foundation Class were introduced since JDK 1.0

    • B. 

      The JFC includes 2D graphics support.

    • C. 

      Swing is based on a tookit.

    • D. 

      Swing supports a technology called "Pluggable Like and Feel"

    • E. 

      JFC is a graphical framework

  • 23. 
    Event handling of JTextArea is:
    • A. 

      None - Event Handling.

    • B. 

      AddFocusListener(new FocusListener(){ public void focusGained(FocusEvent fe){ } public void focusLost(FocusEvent ev){ } });

    • C. 

      AddActionListener(new ActionListener(){ public void actionPerformed(ActionEvent ev){ } });

  • 24. 
    This is a Java program which is meant to run as a part of a web page.
    • A. 

      JFrame

    • B. 

      JApplet

    • C. 

      JDialog

    • D. 

      JPanel

    • E. 

      JWindow

  • 25. 
    Which statements are true?- 4 choices
    • A. 

      The getCurrencyInstance() returns an instance of a NumberFormat class initialized to the specified locale.

    • B. 

      The argument passed can only be primitive data type.

    • C. 

      The getCurrencyInstance() takes an instance of Locale class as an argument.

    • D. 

      The date and time format need not conform to the conventions of the end user's Locale

    • E. 

      Formatting the captions of the GUI components ensures that the look and feel of the application is in a locale-sensitive manner.

  • 26. 
    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.
    • A. 

      Controller

    • B. 

      View

    • C. 

      Model

  • 27. 
    This is used to create a GUI-based application. It is available in the javax.swing package.
    • A. 

      JFrame

    • B. 

      JApplet

    • C. 

      JPanel

  • 28. 
    This class is both a container and a components.
    • A. 

      JWindow

    • B. 

      JApple

    • C. 

      JFrame

    • D. 

      JDialog

    • E. 

      JPanel

  • 29. 
    Event handling of JCheckBox are:
    • A. 

      AddItemListenner(new ItemListenner(){ public void itemStateChanged(ItemEvent e){ } });

    • B. 

      AddActionListener(new ActionListener(){ public void actionPerformed(ActionEvent ev){ } });

    • C. 

      AddFocusListener(new FocusListener(){ public void focusGained(FocusEvent fe){ } });

  • 30. 
    Event Handling of JList are:- 3 choices.
    • A. 

      ActionListener interface.

    • B. 

      ListSelectionListener

    • C. 

      ActionPerformed() method

    • D. 

      ValueChanged(); method

    • E. 

      AddListSelectionListener()

  • 31. 
    Which statements are true?-  2 choices
    • A. 

      The translation of text is the least time - consuming part of the localization process.

    • B. 

      Localization is the process of adapting software for a specific region.

    • C. 

      Textual elements are stored outside the source code and retrieved dynamically.

    • D. 

      Textual elements such as label and messages for GUI components are hard-coded in the program.

    • E. 

      Support for new languages require recompilation

  • 32. 
    An Icon can be added as a corner component to the JScrollPane.
    • A. 

      True

    • B. 

      False

  • 33. 
    This is a Component which lets the user to select a numberic value within a bounded range.
    • A. 

      JRadioButton

    • B. 

      JButton

    • C. 

      JSlider

    • D. 

      JPanel

  • 34. 
    Which statement is true?
    • A. 

      JSlider SL; ............. SL.addChangeListener(new ChangeListener(){ public void stateChanged(ChangeEvent e){ // ction Code; } });

    • B. 

      JSlider SL; ............. SL.addChangeListener(new ChangeListener(){ public void statechanged(ChangeEvent e){ // ction Code; } });

    • C. 

      JSlider SL; ............. SL.addChangelistener(new ChangeListener(){ public void stateChanged(ChangeEvent e){ // ction Code; } });

    • D. 

      JSlider SL; ............. SL.addChangeListener(new ChangeListener(){ public void stateChanged(Changeevent e){ // ction Code; } });

  • 35. 
    Any valid number, uses Character.isDigit.  in MaskFormatter class
    • A. 

      #

    • B. 

      $

    • C. 

      *

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

      JScrollPane

    • B. 

      JFC

    • C. 

      Oracle

  • 37. 
    This Method is used to add a horizontally long component as the column header.
    • A. 

      JScrollPane

    • B. 

      DCJ

  • 38. 
    Any hex character (0-9, a-f or A-F).
    • A. 

      1

    • B. 

      2

    • C. 

      None of above

  • 39. 
    This is as part of its view provides four corners where you can add components.
    • A. 

      JLabel

    • B. 

      JFrame

    • C. 

      JScrollPane

    • D. 

      JPanel

  • 40. 
    Valid values of orientation in Method of JSlider are:-2 choices.
    • A. 

      SwingConstants.HORIZONTAL

    • B. 

      Swing.Constant.HORIZONTAL

    • C. 

      Swing.Constants.VERTICAL

    • D. 

      Public void setOrientation(int orientation);

    • E. 

      SwingConstants.VERTICAL

  • 41. 
    Any character (Character.isLetter). All upper case letters are mapped to lower case.
    • A. 

      L

    • B. 

      None

  • 42. 
    Any character (Character.isLetter).
    • A. 

      ?

    • B. 

      A

    • C. 

      U

    • D. 

      *

  • 43. 
    The language code consisting of two or more letters in Lower case and the country code consisting of two letter in uper case.
    • A. 

      True

    • B. 

      False

  • 44. 
    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:
    • A. 

      Public void setMinorTickSpacing(int spacing)

    • B. 

      Public void setMajorTickSpacing(int spacing)

    • C. 

      Public void setSnapToTicks(boolean set)

  • 45. 
    Which Statement is true?
    • A. 

      JSlider sl; sl = new JSliDer(SwingConstant.VERTICAL,0,255,0);

    • B. 

      JSlider sl; sl = new JSlider(SwingConstants.VERTICAL,0,255,0);

    • C. 

      JSlider sl; sl = new JSlider(SwingConstant.VERTICAL,0,255,0);

    • D. 

      JSlider sl; sl = new JSlider(Swingconstant.VERTICAL,0,255,0);

  • 46. 
    Common Methods of JScroPanel class are:-3 choices.
    • A. 

      Public void setCorner(String key, component corner)

    • B. 

      Public void setHorizontalScrollBarPolicy(int policy)

    • C. 

      Public void setVerticalScrollBarPolicy(int policy)

    • D. 

      Public void setHorizontalScrollBarPolicy(String key, policy)

    • E. 

      Public void actionPerformed(ActionEvent e)

  • 47. 
    Which Statements are true?
    • A. 

      A Swing Timer can fire only one ActionEvent

    • B. 

      A Timer can be configured to fire events repeatedlly

  • 48. 
    Any character (Character.isLetter). All lowercase letters are mapped to upper case.  in MaskFormatter class.
    • A. 

      #

    • B. 

      A

    • C. 

      `

    • D. 

      U

    • E. 

      H

  • 49. 
    Which statements are true?- 3 choice
    • A. 

      A JDialog is a top-level container.

    • B. 

      The container is physically constrained with the max size offered by the screen on which it display

    • C. 

      To return the parent, it is required to close the modal dialog

    • D. 

      If you click on the parent of the modal dialog box, it appears

  • 50. 
    Which statement are true?- 2 choices
    • A. 

      It is not possible to use the String class to convert standard encoding systems to and from the Unicode system.

    • B. 

      Unicode is a 32 bit character encoding system.

    • C. 

      Unicode provides a unique number for every character irrespective of platform, program or language.

    • D. 

      The java platform does not use Unicode as its native character encoding.

    • E. 

      The primitive data type in java is base on Unicode encoding.

  • 51. 
    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.
    • A. 

      JComboBox

    • B. 

      JList

    • C. 

      JTextare

  • 52. 
    This is a Java object associated with a container which governs the placement and size of the component.
    • A. 

      GridLayout

    • B. 

      BorderLayout

    • C. 

      Layout Manager

    • D. 

      CardLayout

    • E. 

      FlowLayout

  • 53. 
    This layout manager allows you to stack components one behind another.
    • A. 

      BorderLayout

    • B. 

      FlowLayout

    • C. 

      CardLayout

    • D. 

      GridLayout

  • 54. 
    Which statements are true?- 3 choices
    • A. 

      All the remote methods declared should be qualified to throw java.rmi.RemoteException.

    • B. 

      Methods from other interfaces which are non-remote are available for clients to invoke.

    • C. 

      The rmiregistry.exe application is available in the bin directory of the java home directory.

    • D. 

      The remote interface extends from java.Remote interfaces

    • E. 

      Remote clients can only invoke remote methods.

  • 55. 
    Which statements are true?- 3 choices
    • A. 

      MVC Architecture was first introduced in SmallTalk.

    • B. 

      Model represents the view of the components

    • C. 

      Controller reacts to the user inputs from Keyboard and Mouse

    • D. 

      View represents the Data.

    • E. 

      Separable Architecture combines the View and Controller.

  • 56. 
    Which statements are true?
    • A. 

      The JPanel is a container and not a component.

    • B. 

      The setSize() method bring JFrame into realized state.

    • C. 

      By default close operation of frame is not functional

    • D. 

      Applet makes web pages more dynamic.

    • E. 

      The stop() method of JApplet is invoked only once in life time of JApplet.

  • 57. 
    Which Statements are true?- 2 choices.
    • A. 

      JPasswordField can be created with the constructor public JPasswordField("password");

    • B. 

      JTextField allow to input single line of text.

    • C. 

      The method setEditable(false) allow you to edit the text

    • D. 

      JTextArea does not allow you to edit the text.

    • E. 

      The text in the JTextArea can be set programmatically.

  • 58. 
    Which statements are true?- 3 choices
    • A. 

      Glass panel is hidden by default

    • B. 

      Layered panel can hold components in specified Z order.

    • C. 

      The menu bar can be added to the content panel

    • D. 

      The general purpose container cannot be added to a top level container.

    • E. 

      The object reference of a content panel is retrieved using the getContentPanel() method.

  • 59. 
    Which components are Top-Level controller.- 3 choices
    • A. 

      JFrame

    • B. 

      JPanel

    • C. 

      JApplet

    • D. 

      JDesktopPanel

    • E. 

      JDialog

  • 60. 
    The setRowHeaderView() method is used to add horizontally long component.
    • A. 

      True

    • B. 

      False

  • 61. 
    These components do not have their peer-components equivalent as compared to AWT components.
    • A. 

      LightWeight Components

    • B. 

      Container Components

  • 62. 
    Container components are:3 choices
    • A. 

      Jlabel

    • B. 

      JPanel

    • C. 

      JFrame

    • D. 

      JApplet

    • E. 

      JTextField

  • 63. 
    Stub and Skeleton Layer:
    • A. 

      Set connection

    • B. 

      Converting Data into on-the-wire-format

    • C. 

      Transmitting and receiving data

    • D. 

      Converting on-the-wire-format into Data

    • E. 

      Invocation of remote method

  • 64. 
    Transport Layer
    • A. 

      Converting Data into on-the-wire-format

    • B. 

      Transmitting and receiving data

    • C. 

      Invocation of remote method

    • D. 

      Set connection

    • E. 

      Converting on-the-wire-format into Data

  • 65. 
    Marshalling
    • A. 

      Converting Data into on-the-wire-format

    • B. 

      Converting on-the-wire-format into Data

    • C. 

      Invocation of remote method

    • D. 

      Transmitting and receiving data