Q.1
Which methods are commonly used in Server Socket class?
  • a) Public Output Stream get Output Stream ()
  • b) Public Socket accept ()
  • c) Public synchronized void close ()
  • d) Public void connect ()
Q.2
Which constructor of Datagram Socket class is used to create a datagram socket and binds it with the given Port Number?
  • a) Datagram Socket(int port)
  • b) Datagram Socket(int port, Int Address address)
  • c) Datagram Socket()
  • d) Datagram Socket(int address)
Q.3
The client in socket programming must know which information?
  • a) IP address of Server
  • b) Port number
  • c) Both IP address of Server & Port number
  • d) Only its own IP address
Q.4
The URL Connection class can be used to read and write data to the specified resource that is referred by the URL.
  • a) True
  • b) False
Q.5
Datagram is basically just a piece of information but there is no guarantee of its content, arrival or arrival time.
  • a) True
  • b) False
Q.6
TCP, FTP, Telnet, SMTP, POP etc. are examples of ___________
  • a) Socket
  • b) IP Address
  • c) Protocol
  • d) MAC Address
Q.7
What does the java.net.InetAddress class represent?
  • a) Socket
  • b) IP Address
  • c) Protocol
  • d) MAC Address
Q.8
The flush () method of Print Stream class flushes any un-cleared buffers in the memory.
  • a) True
  • b) False
Q.9
Which classes are used for connection-less socket programming?
  • a) Datagram Socket
  • b) Datagram Packet
  • c) Both Datagram Socket & Datagram Packet
  • d) Server Socket
Q.10
In Inet Address class, which method returns the host name of the IP Address?
  • a) Public String get Hostname()
  • b) Public String getHostAddress()
  • c) Public static InetAddress get Localhost()
  • d) Public getByName()
0 h : 0 m : 1 s