Ans:
Advantages of Java Sockets:
Sockets are flexible and easy to implement for general communications. - Sockets cause low network traffic unlike HTML forms and CGI scripts that generate and transfer whole web pages for each new request.
Disadvantages of Java Sockets:
Socket-based communications allow only to send packets of raw data between applications. - Both the client side and server side have to provide mechanisms to make the data useful in any way.