Documente Academic
Documente Profesional
Documente Cultură
Session 34 – Networking
1) Which constructor of the ServerSocket class creates a server socket an the
specified port with a queue length of 50?
a) ServerSocket(int port)
b) ServerSocket(int port,int maxQueue)
c) ServerSocket(int port,int MaxQueue,InetAddress localAddress)
2) Which of the following is a general purpose class for accessing the attributes of
resource?
a) URL Connection
b) URL Encoder
c) URL
3) The _____, and_______, and_______ classes are for use with UDP (choose 3)
a) DatagramPacket
b) DatagramSocket
c) MulticastSocket
d) ServerSocket
4) _________ is a low – level routing protocol that breaks data into small packets
and sends them to an address across a network, which does not guarantee to deliver
packets to the destination.
a) Internet Protocol
b) Transport Control Protocol
c) User Datagram Protocol
5) Which method of the Socket class returns the remote port to which the Socket
objects connected?
a) int getPort()
b) int getLocalPort()
c) InetAddress getInetAddress()
6) The _____ , ______ , _______ ,and ________ classes all use TCP to communicate
over the network . (Choose 4)
a) URL
b) URLConnection
c) Socket
d) ServerSocket
e) DatagramSocket
7) A ________ is one end – point of a two–way communication link between two
programs running on the network.
a) Socket
b) ServerSocket
c) Connection
Session 36 – RMI
1) Which three of the following are classes of Java.rmi package?
a) Naming
b) MarshalledObject
c) RMISecurityManager
d) Remote
2) The bind() and rebind() method belongs to which class of the java.rmi package.
a) Naming class
b) RMISecurityManager class
c) RMIloader class
3) What will marshall and unmarshall your object? (choose 2)
a) Sub
b) Skeleton
c) Client
d) Server
4) Which of the following statements are true with reference to RMI ?
i. RMI is language independent.
ii. RMI is platform independent.
a) Only Statement 1 is true.
b) Only Statement 2 is true.
c) Both the statements are true.
d) Both the statements are false.
5) _______ classs is a sub-class of RemoteObject in Java RMI.
a) RemoteServer
b) Operation
c) LogStream
d) MarshalledObject
6) Which of the following Exceptions are thrown for protocol errors or
communication failure?
a) RemoteException
b) ConnectException
c) AccessException
d) UnExceptedException
7) _________ is thrown if we attempt to invoke a method on a remote object that
does not exist .
a) NoSuchMethodException
b) NoSuchServerException
c) NoSuchObjectException
d) InvalidRefrenceException
Addition
1/ The ______ consists of names across all cells within an enterprise
a) Directory services
b) Security services
c) Remote services
2/ The _______ method of the ActivationDesc class returns the object containing
serialized information
a) getData()
b) getGroupData()
c) getRestartModel()
3/ Which of the following classes in java.lang.reflect package contains integer
constants and static methods?
a) Constructors
b) Modifiers
c) Members
d) Arrays