Code Pumpkin

Category Archives: Core Java

Types of Class Loader | Delegation Algorithm | JVM Internals

August 13, 2017
Posted by Riteeka Rathod

In previous articles, we learned about JVM architecture and one of its component Class Loader SubSystem. In this article,  we will discuss about Types of Class Loaders and How Class Loader uses Parent delegation Algorithm to load the class. If you have not gone through previous article on JVM Internals, I would encourage you to read that first. […]

Class Loader SubSystem | JVM Internals

August 5, 2017
Posted by Riteeka Rathod

​In our previous article of JVM internals series, we learned about what is JVM, basic architecture of JVM and briefly understood its components. In this article we will discuss in detail about Class Loader SubSystem component of JVM architecture . Class Loader SubSystem Java’s dynamic class loading functionality is handled by the Class Loader SubSystem. […]

java.util.stream – Stream APIs basics | Java8

July 29, 2017
Posted by Dipen Adroja

In this article we will walk through basic overview of java.util.stream package. Package java.util.stream contains classes that support functional type of operations on streams of elements, such as map-reduce transformation, filtering etc. By the end of the article we will be able to answer following questions: 1. What is streams?  2. How it can be created?  […]

JVM Architecture Introduction | JVM Internals

July 26, 2017
Posted by Riteeka Rathod

Being a java developer, it is expected from us to have basic knowledge of JVM architecture, as it enables us to write code more efficiently. Also from the interview perspective JVM architecture, Class loader subsystem, JVM memory management are frequently discussed topics with 3-5 year experienced java developer. If you are able to answer these questions, you will create good impression […]

What is the use of private constructor in java?

In Java, we can use any access modifier (i.e. public, protected or private) with constructor.  So, what are the uses of making constructor private? First thing that strikes your mind is Singleton Design Pattern which is also one of the most asked Core Java Interview Question to the 3-4 yr exp Java developers.  Apart from creating singleton class, private constructor […]

Threadpool using Executor Framework | Java Concurrency Utilities

June 30, 2017
Posted by Abhi Andhariya

The JDK 1.5 Executor framework is a combination of various Executor interfaces and Executors utility class to provide a thread pool feature in Java.  In server side programming, Thread pool is an important concept to maintain scalability, robustness, and stability of the system.   Thread pool is a pool of worker threads, which is ready to perform any task given to them, […]

Defining and Starting a Thread | Thread VS Runnable

Java threads are objects like any other Java objects. Threads are instances of class java.lang.Thread, or instances of subclasses of this class. In addition to being objects, java threads can also execute code. Creating and Starting Threads Here is the code to create a Thread and start its execution. // Creates Thread Object Thread thread = […]

CountDownLatch Vs CyclicBarrier | Java Concurrency Utilities

CountDownLatch Vs CyclicBarrier : Though both are used as a synchronization aid that allows one or more threads to wait but there are certain differences between them that you should know in order to know when one of these utilities will serve you better.  As per the java.util.concurrent API,  CountDownLatch: A synchronization aid that allows one or more threads to […]

CyclicBarrier | Java Concurrency Utilities

May 25, 2017
Posted by Abhi Andhariya

CyclicBarrier  was introduced in Java 5 along with other concurrent classes like CountDownLatch, ConcurrentHashMap, CopyOnWriteArrayList, BlockingQueue within java.util.Concurrent package. There are scenarios in concurrent programming when you want set of threads to wait for each other at a common point until all threads in the set have reached that common point.  The java.util.concurrent.CyclicBarrier class is a barrier that […]

final keyword in Java

May 14, 2017
Posted by Dipen Adroja

final is a keyword in Java. It can be used with variable, method or class. In this article we will see how we can make variable, method or class final in java and what are the advantages of doing so. If we make a method final, we can not override it in subclass.If we make […]

Previous Posts Next posts
Total Posts : 124
follow us in feedly

Like Us On Facebook