Java

Java Interview Questions and Answers

Enterprise Java Beans Interview Questions

What are the two important TCP Socket classes?
Socket and ServerSocket.
ServerSocket is used for normal two-way socket communication. Socket class allows us to read and write through the sockets. getInputStream() and getOutputStream() are the two methods available in Socket class.

What technologies are included in J2EE?
The main technologies in J2EE are: Enterprise JavaBeansTM (EJBsTM), JavaServer PagesTM (JSPsTM), Java Servlets, the Java Naming and Directory InterfaceTM (JNDITM), the Java Transaction API (JTA), CORBA, …

Core Java Interview Questions

1.what is a transient variable?

A transient variable is a variable that may not be serialized.

2.which containers use a border Layout as their default layout?

The window, Frame and Dialog classes use a border layout as their default layout.

3.Why do threads block on I/O?

Threads block on i/o (that is enters the waiting state) so that other threads may execute while the i/o Operation is performed.

4. How are Observer …