Core Java Interview Questions | Eklavya Online

Core Java Interview Questions

Why is Serialization required? What is the need to Serialize

Serialization is required for a variety of reasons. It is required to send across the state of an object over a network by means of a socket. One can also store an object’s state in a file. Additionally, manipulation of the state of an object as streams of bytes is required. The core of Java …

Why is Serialization required? What is the need to Serialize Read More »

Explain the Struts1/Struts2/MVC application architecture?

Struts was adopted by the Java developer community as a default web framework for developing web applications The MVC(Model–view–controller) an application that consist of three distinct parts. The problem domain is represented by the Model. The output to the user is represented by the View. And, the input from the user is represented by Controller.

Why there are two Date classes; one in java.util package and another in java.sql?

A thin wrapper around a millisecond value that allows JDBC to identify this as an SQL DATE value. A milliseconds value represents the number of milliseconds that have passed since January 1, 1970 00:00:00.000 GMT. To conform with the definition of SQL DATE, the millisecond values wrapped inside a java.sql.Date instance must be ‘normalized’ by …

Why there are two Date classes; one in java.util package and another in java.sql? Read More »

What is the difference between exception and error?-

?– The exception class defines mild error conditions that your program encounters. Exceptions can occur when trying to open the file, which does not exist, the network connection is disrupted, operands being manipulated are out of prescribed ranges, the class file you are interested in loading is missing. The error class defines serious error conditions …

What is the difference between exception and error?- Read More »