Top 250+ Solved Java Programming MCQ Questions Answer
Q. Which of these Exceptions is thrown by remote method?
a. RemoteException
b. InputOutputException
c. RemoteAccessException
d. RemoteInputOutputException
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
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
Q. Which of this package contains classes and interfaces for networking?
a. javio
b. java.util
c. java.net
d. java.network
Q. Which of these is superclass of ContainerEvent class?
a. WindowEvent
b. ComponentEvent
c. ItemEvent
d. InputEvent
Q. Which of these events is generated when the size os an event is changed?
a. ComponentEvent
b. ContainerEvent
c. FocusEvent
d. InputEvent
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()
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");
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
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
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
Q. The following specifies the advantages of It is lightweight. It supports pluggable look and feel. It follows MVC (Model View Controller) architecture.
a. Swing
b. AWT
c. Both A & B
d. None of the above
Q. Swing is not a part of JFC (Java Foundation Classes) that is used to create GUIapplication?
a. True
b. False
c. none
d. all
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