Java / J2EE - Interview Questions and Answers on Socket

Q1.  What are some Java related technologies used for distributed computing ?

Ans. sockets, RMI. EJB

Q2.  What are the advantages and Disadvantages of Sockets ?

Ans. Sockets are flexible and sufficient. Efficient socket based programming can be easily implemented for general communications. It cause low network traffic.

Socket based communications allows 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.

Q3. Which is the Parent Class of Socket class?


Q4. What is the package name for Socket class?

Q5. Which are the subclasses for Socket?

Ans.[, SSLSocket]

Q6. Which interfaces are implemented by Socket?

Ans.[, Closeable, AutoCloseable]