Unit 4 Nw Basics
Unit 4 Nw Basics
2. IPv6 uses .
a) 4 groups of 8 bits each
b) 4 group of 8 hexa‐ decimal digits
c) 8 groups of 4 digits each
d) 8 groups of 4 hexa‐ decimal digits each
4. Name the class which is used to create a port where the server will listen.
(a) Server (b) Socket (c) ServerSocket (d) SocketServer
17. Network programming in any language definitely needs to deal with and .
a. user names; port numbers b. IP addresses; link‐ layer
address c. IP addresses; port numbers d.
None of the choices are correct
18. The class used in Java network programming for socket address is the
class.
21. Which of these package contains classes and interfaces for networking?
A. java.io B. java.util C. java.net D. javax.swing
a. Local IP, Remote IP, Local MAC, Remote MAC and Protocol
b. Local IP, Local PORT, Remote MAC, Remote PORT and Protocol
c. Local MAC, Local PORT, Remote MAC, Remote PORT and Protocol
d. Local IP, Local PORT, Remote IP, Remote PORT and Protocol
A. With stream sockets there is no need to establish any connection and data flows
between the processes are as continuous streams.
B. Stream sockets are said to provide a connection‐ less service and UDP protocol
is used
C. Datagram sockets are said to provide a connection‐ oriented service and TCP
protocol is used
D. With datagram sockets there is no need to establish any connection and data
flows between the processes are as packets.
26. Which of the following method call is valid to obtain the server's hostname by
invoking an applet?
A. getCodeBase().host() B. getCodeBase().getHost() C.
getCodeBase().hostName() D. getCodeBase().getHostName()
27. The server listens for a connection request from a client using which of the
following statement?
28. The client requests a connection to a server using which of the following
statement?
29. To connect to a server running on the same machine with the client, which of
the following cannotbe used for the hostname?
32. Which of the following protocols is/are for splitting and sending packets to an
address across a network?
A. TCP/IP B. FTP C. SMTP D. UDP