Serialization and Deserialization in java

Serialization is a process of converting object into a sequences of byte which can be written to disk or database or sent over network to any other running JVM. The reverse process of creating object from sequences of byte is called Deserialization. A class must implement the Serializable interface present…

Continue reading

Collection Interview Questions

How can we make Hashmap synchronized? HashMap can be synchronized by Map m = Collections.synchronizedMap(hashMap); Question 13 : What are IdentityHashMap and WeakHashMap? IdentityHashMap : IdentityHashMap is similar to HashMap except that it uses reference equality when comparing elements. IdentityHashMap class is not a widely used Map implementation. While this…

Continue reading

Thread Local

Thread Local Thread Local can be considered as a thread scope. You can set any object in Thread Local and this object will be global and local to the specific thread which is accessing this object. Values stored in Thread Local are global to the thread, meaning that they can…

Continue reading

Proxy Objects,Eager and Lazy Fetch Types

Lazy Initialisation: Lazy Fetch Types: Lazy Initialisation do not initialise the entire object,it first initialise only the first level variables and it initialise the second level such as a list of address only when we actually want to access it. Now in our example suppose we have to fetch the values for…

Continue reading

Hibernate-Value Types and Embedding Objects

Lets first understand what is a Value Type. Suppose in your entity class you have an object as a member variable which has its own attribute but which does not have a meaning unless it has a context with the entity class. For example In our entity class UserDetails suppose…

Continue reading

Hibernate-Primary Keys

Hibernate Primary keys   As we know @Id creates a primary keys in our previous post. First lets understand what is a natural and a Surrogate keys Natural Keys: Suppose in your application you have a column which is mandatory and whose value will be distinct for business reason so…

Continue reading

RESTful Webservice Interview Questions

What REST stands for? REST stands for REpresentational State Transfer. What is REST? REST is web standards based architecture and uses HTTP Protocol for data communication. Here every component is a resource which are accessed using common interface using HTTP standard methods. In REST architecture, a REST Server simply provides access to…

Continue reading

Evaluation

What is Spring Application Context ? The ApplicationContext is the central interface within a Spring application for providing configuration information to the application. It is read-only at run time, but can be reloaded if necessary and supported by the application. A number of classes implement the ApplicationContext interface, allowing for…

Continue reading