Himanshu shriv has Published 45 Articles

Differences between stack and queue data structure

Himanshu shriv

Himanshu shriv

Updated on 21-Jan-2020 07:37:57

559 Views

Stack and queue both are data structure to store data in particular order.Stack is linear data structure in which objects are inserted or removed at the same end. Therefore, it is visualized as vertical collection. That is the reason why stack is called Last-in-First-out (LIFO) type of list.Queue is also a ... Read More

Difference between green and native thread

Himanshu shriv

Himanshu shriv

Updated on 21-Jan-2020 07:34:28

1K+ Views

Green threads are created and scheduled by Virtual machine without using OS libraries. “Green” was the project code name of the thread project which was developed by the Java, therefore the name of the thread is “Green”. It can not make use of multiprocessor.On the other hand, Native threads are created ... Read More

Difference between save() and persist() in Hibernate

Himanshu shriv

Himanshu shriv

Updated on 21-Jan-2020 07:33:48

22K+ Views

Save() and persist() both methods are used for saving object in the database. As per docs −Save()  − Persist the given transient instance, first assigning a generated identifier. (Or using the current value of the identifier property if the assigned generator is used.) This operation cascades to associated instances if the association is mapped ... Read More

Difference Between get() and load() in Hibernate

Himanshu shriv

Himanshu shriv

Updated on 21-Jan-2020 07:19:37

26K+ Views

In hibernate, get() and load() are two methods which is used to fetch data for the given identifier. They both belong to Hibernate session class. Get() method return null, If no row is available in the session cache or the database for the given identifier whereas load() method throws object ... Read More

Difference Between First level cache and Second level cache in Hibernate

Himanshu shriv

Himanshu shriv

Updated on 21-Jan-2020 07:12:08

10K+ Views

Hibernate support two type of cache one is first level cache and other is second level cache. First level cache is a session level cache and it is always associated with session level object. This type of cache is used for minimizing Db interaction by caching the state of the object. That ... Read More

Advertisements