Which class is used to represent a datagram socket for communication between two computers over a network in Java?
a) ServerSocket
b) Socket
c) DatagramSocket
d) MulticastSocket
Solution: c) DatagramSocket
Explanation: The DatagramSocket class is used to represent a datagram socket for communication between two computers over a network in Java.