Which constructor of Datagram Socket class is used to create a datagram socket and binds it with the given Port Number?

A)  Datagram Socket()
B)  Datagram Socket(int port)
C)  Datagram Socket(int address)
D)  Datagram Socket(int port, Int Address address)

Correct Answer :   Datagram Socket(int port, Int Address address)


Explanation : Datagram Socket (int port, Int Address address) is used to create a datagram socket. A datagram socket is created for connection-less communication between the server and the client. There is no accept() method in this class.