Top 250+ Solved Java Programming MCQ Questions Answer

From 76 to 90 of 285

Q. Which of these Exceptions is thrown by remote method?

a. RemoteException

b. InputOutputException

c. RemoteAccessException

d. RemoteInputOutputException

  • a. RemoteException

Q. Which of this class is used for creating a client for server-client operations?

a. serverClientjava

b. Client.java

c. AddClient.java

d. ServerClient.java

  • c. AddClient.java

Q. Which of this package is used for all the text related modifications?

a. javtext

b. java.awt

c. java.lang.text

d. java.text.mofify

  • a. java.text

Q. Which of this package contains classes and interfaces for networking?

a. javio

b. java.util

c. java.net

d. java.network

  • c. java.net

Q. Which of these is superclass of ContainerEvent class?

a. WindowEvent

b. ComponentEvent

c. ItemEvent

d. InputEvent

  • b. ComponentEvent

Q. Which of these events is generated when the size os an event is changed?

a. ComponentEvent

b. ContainerEvent

c. FocusEvent

d. InputEvent

  • a. ComponentEvent

Q. Which of these methods can be used to obtain the reference to the container that generated a ContainerEvent?

a. getContainer()

b. getContainerCommand()

c. getActionEvent()

d. getContainerEvent()

  • d. getContainerEvent()

Q. To locate a remote object with a name t at port 7000 on host panda.armstrong.edu, use

a. Remote remoteObj = Name.lookup("rmi://pandarmstrong.edu:7000/t");

b. Remote remoteObj = Name.lookup("//panda.armstrong.edu:7000/t");

c. Remote remoteObj = Name.lookup("http://panda.armstrong.edu:7000/t");

d. Remote remoteObj = Naming.lookup("rmi://panda.armstrong.edu:7000/t");

  • d. Remote remoteObj = Naming.lookup("rmi://panda.armstrong.edu:7000/t");

Q. ____________ is a subinterface of java.rmi.Remote that defines the methods for the server object.

a. Server stub

b. Server implementation

c. Server object interface

d. RMI Registry

  • c. Server object interface

Q. Each remote object has a unique name identified by an URL with the protocol rmi as follows:

a. http://host:port/name

b. //host:port/name

c. http://host/name

d. rmi://host:port/name

  • b. //host:port/name

Q. __________ provides the naming services for the server to register the object and for theclient to locate the object.

a. Server stub

b. RMI Registry

c. Server implementation

d. Server Skeleton

  • b. RMI Registry

Q. Which package provides many event classes and Listener interfaces for event handling?

a. javawt

b. java.awt.Graphics

c. java.awt.event

d. None of the above

  • c. java.awt.event
Subscribe Now

Get All Updates & News