The article describes about how the memory space is divided in JVM. The article also explains the different type of GC algorithms and also its behavior with the memory space...
LSM trees are designed to achieve higher throughput and are used as the storage engine of various DB such as HBase, Cassandra, LevelDB, SQLite. As the name suggests, writes are made to log files in append-only mode. These logs files are merged and compacted in the background and indexed for efficient search.
The main intention of using lambda is to pass a block of code. The code block can be used of immediate execution or can be later too. But Java is object oriented programming and until now creation of any block had to be done by wrapping around the class and creating an object..
Collections is an in memory data structure which holds all the elements in the memory. In Stream the elements are computed on demand and the values are passed to next stream or returned. In Collection, the entire collection has to be computed to pass on to the next collection..
Java Memory is one of the most interesting concepts in JVM and its always fun to know how java memory model is designed. Java memory model (JMM) has quite a few components of which stack and heap are two of them...
Object class provides two methods hashcode() and equals() to represent the identity of an object. It is a common convention that if one method is overridden then other should also be implemented...
Object class provides two methods hashcode() and equals() to represent the identity of an object. It is a common convention that if one method is overridden then other should also be implemented...
Java collections Map Interface have multiple implementations. Different types of maps, such as HashMap, TreeMap, HashTable and LinkedHashMap.
Producer Consumer problem is a classic concurrency problem and is often asked in interview. The problem goes as follows: Producer and Consumer are two separate threads which share a same bounded Queue...
Producer Consumer problem is a classic concurrency problem and is often asked in interview. The problem goes as follows: Producer and Consumer are two separate threads which share a same bounded Queue.
ConcurrentHashMap is designed to be more efficient and have better performance in multi-threaded enivorment when compared to hashtable.
== operator is binary operator used to compare the primitives and objects in java. Primitives such as int, float, boolean can use == to compare the values of primitive variables...
To send the data securely, https was invented which is nothing but HTTP +SSL (Secure Socket Layer). SSL uses cryptography to encrypt the text.
One of the common uses case is to work with Json string. Simple use case is to convert a strong to POJO object, java collections or vice versa. Json jackson library is a common library for such use cases...
A singleton is simply a class that is instantiated exactly once in the Java Virtual Machine. It is used to provide global point of access to the object. In terms of practical use Singleton patterns are used in ...
One of the common uses case is to work with Json string. Simple use case is to convert a strong to POJO object, java collections or vice versa. Json jackson library is a common library for such use cases...
In Java the iterators allow to traverse the collections. Iterator is an interface which has two methods hasNext() and next(). Iterators returned by the Collection are either fail-fast in nature or fail-safe in nature...
final - final keyword can be used with a class, variable or a method. The underlying behavior of using final keyword is to act as constant...
When an object of immutable class is created, the state or value of it cannot be changed , it means any modification on immutable object will result in a new immutable object. Immutable objects are particularly useful in concurrent applications.
Static factories and constructors share a limitation, they do not scale well for large number of optional parameters. Consider an example where you have a class representing a Book.
Mutexes, monitors and semaphores are all synchronization mechanisms i.e. they are used to mediate access to a shared resource between multiple processes or threads (referred to as processes henceforth). However, they are used differently:
The BASE acronym was defined by Eric Brewer, who is also known for formulating the CAP theorem. Distributed systems are prone to outages and not safe from network failures...
Main difference between String and StringBuffer is String is immutable while StringBuffer is mutable means you can modify a StringBuffer object once you created it without creating any new object.