Network Programming MCQ with answersheet 2020 batch BCA Sixth Semester exam held on sep 11
i.A Socket Consists Of?
a) Port+IP address
b) Only IP address
c) only Port address
d) MAC address
correct answer is:
a) Port + IP address
2.Port numbers range from…..to…….
a) 1 to 65536
b) 0 to 65535
c) -65535 to 65536
d) 0 to 1024
The correct answer is:
b) 0 to 65535
3.Which of these Exceptions is thrown by a remote method ?
a) RemoteAccessException
b) InputOutputException
c) RemoteException
d) RemoteInputOutputException
The correct answer is:
c) RemoteException
4.Which of these package contains classes and interfaces for networking?
a) java.util
b) java.io
c) java.network
d) java.net
The correct answer is:
d) java.net
5.What is the size of port address to create sockets in java network programming ?
a) 16 bits
b) 32 bits
c) 8 bits
d) 128 bits
The correct answer is:
a) 16 bits
In Java network programming, a port address is 16 bits long, allowing for 65,536 possible port numbers (0 to 65535).
6.Which of these method of MimeHeader is used to return the string equivalent of the values stores on MimeHeader?
a) string()
b) convertString()
c) toString()
d) getString()
The correct answer is:
c) toString()
7 Which class implements a connectionless packet delivery service.
a) ServerSocket
b) InetAddress
c) DatagramPacket
d) DatagramSocket
The correct answer is:
d) DatagramSocket
8. Which of the following is not a HTTP Method?
a) DELETE
b) PUT
c) POST
d) CREATE
The correct answer is:
d) CREATE
ix Which method of URL class returns the object of URLConnection class?
a) openConnection()
b) createConnection()
c) getConnection()
d) connect()
The correct answer is:
a) openConnection()
10.Which of the following method isn’t used for choosing the cipher suites using
SocketFactory ?
a) getSupportedCipherSuits ()
c) getEnabledCipherSuites ()
b) setSupported CipherSuits()
d) setEnabledCipherSuites ()
The correct answer is:
b) setSupportedCipherSuits()