Latest Posts From Pankaj

Memcached Tutorial

Memcached is Free & open source, high-performance, distributed memory object caching system. Memcached is used by almost all the major websites with huge data, for example YouTube, Wikipedia, Twitter etc. Memcached is a very popular….

How to write XML file in Java (DOM Parser)

Earlier we learned how to read XML file and how to edit XML file in java using DOM Parser, today we will learn how to write an XML file in java using DOM Parser. Here….

AtomicInteger in Java

Today we will look into AtomicInteger in Java. Atomic operations are performed in a single unit of task without interference from other operations. Atomic operations are necessity in multi-threaded environment to avoid data inconsistency. AtomicInteger….

Java Callable Future Example

Java Callable and Future are used a lot in multithreaded programming. In last few posts, we learned a lot about java threads but sometimes we wish that a thread could return some value that we….

Multithreading in Java

Multithreading in Java is a very important topic. I have written a lot about Threads in Java. Java Thread is a lightweight process that executes some task. Java provides multithreading support with the Thread class….

Java ThreadLocal Example

Java ThreadLocal is used to create thread local variables. We know that all threads of an Object share it’s variables, so the variable is not thread safe. We can use synchronization for thread safety but….

Daemon Thread in Java

Daemon thread in java can be useful to run some tasks in background. When we create a thread in java, by default it’s a user thread and if it’s running JVM will not terminate the….

Thread Pool In Java

ThreadPoolExecutor – Java Thread Pool Example

Java thread pool manages the pool of worker threads. It contains a queue that keeps tasks waiting to get executed. We can use ThreadPoolExecutor to create thread pool in Java. Java thread pool manages the….

Thread Safety in Java

Thread Safety in Java is a very important topic. Java provides multi-threaded environment support using Java Threads, we know that multiple threads created from same Object share object variables and this can lead to data….

Deadlock in Java Example

Deadlock in java is a programming situation where two or more threads are blocked forever. Java deadlock situation arises with at least two threads and two or more resources. Here I have written a simple….

Generic selectors
Exact matches only
Search in title
Search in content
Search in posts
Search in pages