Category Archives: JAVA

JAVA

First Level cache and second level cache in hibernate

First Level Cache First-level cache always Associates with the Session object. Hibernate uses this cache by default. Here, it processes one transaction after another one, means wont process one transaction many times. Mainly it reduces the number of SQL queries it needs to generate within a given transaction. That is instead of updating after every Continue Reading…

Difference between ArrayList and Vector

There are main two difference between ArrayList and Vector 1. Synchronization: ArrayList is not synchronized , but Vector is synchronized. Because ArraList is not synchronized so it is not thread safe. Vector is thread safe. Because Vector is thread safe, in terms of performance Vector is slower than ArrayList. 2. Data size Increament: ArrayList increase Continue Reading…