📝 Question
#2312
Which constructor of Datagram Socket class is used to create a datagram socket and binds it with the given Port Number?
✓
Correct Answer
B. 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.
⌨️ Press
A
B
C
D
to select