Latest Posts

Java StAX Parser Example to read XML file

We can use Java StAX parser to read XML file. Java Streaming API for XML (Java StAX) provides implementation for processing XML in java. StAX consists of two sets of API – cursor based API….

Java Multithreading Interview

Java Multithreading Concurrency Interview Questions and Answers

Today we will go through Java Multithreading Interview Questions and Answers. We will also look into Concurrency interview questions and answers because both multithreading and concurrency go hand in hand. Thread is one of the….

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….

close
Generic selectors
Exact matches only
Search in title
Search in content