Java Overview
This is the first Java tutorial from a series of tutorials for beginners. If you want to learn Java in a…
This is the first Java tutorial from a series of tutorials for beginners. If you want to learn Java in a…
In this tutorial I will show you how to simplify your Java programming with Eclipse IDE. (more…)
This list contains the most common eclipse shortcuts for Windows, Linux and Mac OS. Using shortcuts will improve your coding efficiency. You…
In this tutorial you will learn how to install latest Java 8 on Ubuntu or LinuxMint via PPA. (more…)
This tutorial will explain how to download and install Java on your computer. We will also show you how simple…
In this tutorial, you will learn about Java primitive types and how to choose the right one. (more…)
In this tutorial, we will be going through the installation process of Maven. If you are a WINDOWS user (if…
Simply said, Maven profile is a set of configuration value which override default values. By using it, it allows you…
If you've ever wondered whether you can upload your own libraries as a dependency using Maven, the answer is yes,…
What is software testing and why is it useful? Testing software in the simplest terms is to evaluate whether it…
This tutorial will cover how to run Unit tests using the Maven’s Surefire plugin. If you are not familiar with…
What you will need. IDE or a text editor JDK 1.8 or above Maven What exactly is Maven’s multi-module? This…
We do not normally need additional dependencies when it comes to creating an executable jar. All we need to do is…
Before proceeding with the next steps, make sure you have JDK and Maven installed on your system. If you don't…
This article describes the Java Virtual Machine (JVM) and its architecture (more…)
Memory can be described as an array of bytes where you can access each byte individually. In each byte or…
In this post, I’ll teach you multiple methods for capturing java heap dump. Critical for memory consumption optimisation, a heap…
This tutorial explains how Java loops are created and how did they work. (more…)
This article discusses about Java Garbage Collection (GC) which is considered as one of the complex topics in Java programming…
In this tutorial I will show you how to create and use arrays in Java (more…)
In this example I will show you how to read files using the Java programming language. (more…)
Let's give an example first before going deeper into what Mutex is: Think of a queue. Doesn't matter short or…
Semaphore can be used to limit the amount of concurrent threads and essentially, this class maintains a set of permits.…
Stream API allows developers to take advatange of multi core architectures and improve the performance of Java program by creating…
This article talks about the importance of thread synchronization in Java and how you can implement it in your programs.…
Active threads consume system resources, which can cause JVM creating too many threads which means that the system will quickly…
ThreadLocal is a class that provides thread local variable and is used to achieve thread safety. The data stored will…
The following article talks about the livelock and deadlock states in java, how they occur and what can be done…
The result of an asynchronous computation is called Future and more specifically, it has this name because it (the result) will be…
Java equals() method and the "==" operator are both used to compare objects for equality. However, they are doing the…
Java 8 introduced Lambda Expressions and is one of the biggest, if not the biggest, feature that was introduced because…
Java 8 introduced Optional class which is used to manipulate data based on whether a value is present or absent.…
Java 11 introduced the HTTP Client which can be used to send requests over the network and retrieves their responses.…
This tutorial will help you understand how to perform basic database operations such as Create, Retrieve, Update and Delete (CRUD)…
In this tutorial, I will explain the fundamentals of java classes and objects. (more…)
Follow this tutorial to understand the principles of object oriented programming and write reusable and clean code (more…)
This example demonstrates the usage of encapsulation in Java programming language (more…)
In this tutorial I will show you how to create and work with Java Interfaces. As always I will demonstrate…
This example demonstrates the usage of inheritance in Java programming language (more…)
This example demonstrates the usage of abstraction in Java programming language (more…)
This example demonstrates the usage of polymorphism in Java programming language (more…)
This article demonstrates the difference between method overloading and method overriding in Java with examples (more…)
Control flow statements in Java allow you to run or skip blocks of code when special conditions are met. You…
This article explains the key components of Java class loaders. (more…)
Enum type is a special data type which holds different constants such as WHITE, BLACK, RED. The convention is that…
The super class in Java java.lang.Object provides two important methods for comparing objects: equals() and hashcode(). These methods are widely used when faced against implementing…
What are unit tests? Unit tests are a method of software testing in which small components of a Java application…
What is profiling? Profiling examines an application and tries to locate memory or performance issues that are associated with a…
This tutorial explains JFrame basics from creation to customization. (more…)
This tutorial explains various JFrmae layouts with examples and use. (more…)
This tutorial explains how to display text and graphics on JFrmae for example, lines, circle and rectangle. (more…)
This tutorial explains how you can interact with JFrame by using buttons, listeners and text fields. (more…)
This tutorial will explain how to create Java JAR file with Maven with step by step guidelines and screen shots.…
The "Collections" framework in Java came into action with the release of JDK 1.2 and was expanded quite a few…
Java offers you a variety of collection implementations to choose from. In general you will always look for the collection with…
Java ArrayList class is a resizable array that implements the List interface. It permits all elements, including null and also…
LinkedList class in Java uses a doubly linked list to store elements and it also provides a linked-list data structure.…
Collections that use a hash table for storage are usually created by the Java HashSet class. As the name suggests,…
Java TreeSet class is a NavigableSet implementation that is based on TreeMap. The elements are either ordered by a Comparator…
LinkedHashSet class in Java differs from HashSet as its implementation maintains a doubly-linked list across all elements. This linked list…
Java EnumSet class implements Set and uses it with enum types. EnumSet (as the name suggests) can contain only enum values and…
Java 8 finally allows us, the programmers, to create thread-safe ConcurrentHashSet in Java. Before then, it was simply not possible.…
Arrays' items are stored as an ordered collection and we can access them by indices. HashMap class in Java on…
LinkedHashMap is a combination of hash table and linked list that implement the Map interface with predictable iteration order. The…
TreeMap implements the Map interface and also NavigableMap along with the Abstract Class. The map is sorted according to the…
EnumMap class implements the Map class and enables the use of enum type keys. Enum maps are maintained in the natural…
WeakHashMap in Java implements the Map interface and represents a hash table that has weak keys. If a key is not in…
IdentityHashMap implements the Map interface and two keys are considered equal when checked as k1==k2 (not by using equals method). This itself violates…
SortedMap interface extends Map and ensures that all entries are in an ascending key order (hence SortedMap). If you want…
Even though Map is implemented by many classes, many of them are not thread-safe or some of them are but not efficient.…
Hashtable implements a hash table (as the name suggests) and maps keys to values (like LinkedHashMap). Hashtable class allows non-null…
This article explains the differences between ArrayList and LinkedList and in which case we should prefer the one over the…
This examples shows you how to iterate through a HashMap in Java (more…)
Following examples demonstrate how to initialize a Java HashMap using standard and inline methods. (more…)
In this article I will explain the difference between java HashMap and java TreeMap (more…)
Graphs are usually made from vertices and arcs. Sometimes they are also called nodes (instead of vertices) and edges (instead…
Searching and/or traversing are equally important when it comes to accessing data from a given data structure in Java. Graphs…
Searching or traversing is really important when it comes to accessing data from a given data structure. There are different…
Before starting to explain the different time complexities, let's first look at what an actual algorithm is. The formal definition…
Serialized object. What does that mean? Java provides a functionality which represents an object as a sequence of bytes which…
Reflection (which is a feature in Java) allows executing Java program to examine itself (or another code) and manipulate internal…
This article discusses the concept of weak references in Java. (more…)
Java 8 introduced a new Date-Time API which purpose is to cover drawbacks of the old date-time API. The previous…
Today I will show you the very basics of Regular Expressions and how to use them in Java. (more…)
Sometimes you wish to know how much disk space is left on your hard drive. There are several ways to…
In this example I will show you how to generate the MD5 hex sum for a given string using Java…
The Java memory model specifies how the Java virtual machine works with the computer's memory (RAM). In this tutorial I…
In this tutorial I will show you how to store and retrieve values from a properties file in Java (more…)
This tutorial demonstrates how to install and configure Java 9 Beta on Eclipse Oxygen (more…)
This tutorial explains how to use the JShell tool in Java 9 (more…)
This example demonstrates how to create immutable lists with the new Java 9 Collections factory methods (more…)
This example demonstrates how to create immutable Set with the new Java 9 Collections factory methods (more…)
This example demonstrates how to create immutable Map with the new Java 9 Collections factory methods (more…)
As we know design pattern are created to solve a specific problem. Singleton solve the problem of creating only one…
This article describes the proxy design pattern in java. (more…)
The Observer pattern is a software design pattern in which an object, called the subject, maintains a list of all…
This article talks about the factory design pattern in Java which is one of the popular design patterns used in…
Here we will talk about the Java Builder design pattern, where and how it should be used. (more…)
in this tutorial, we will discuss java comparator and its examples. What is Java Comparator? Java Comparator is an interface…
The JavaMail API "pp"-independent(platform and protocol) framework which purpose is to help build messaging and mail applications. It is (more…)