Java Variables And Their Types With Examples

Java variables

In this Tutorial, we will Explore Java Variables, Types of Variables, Java Instanceof,  Scope & Lifetime of a Variable with the help of Examples: We will also see a few frequently asked questions that would help you in understanding the topic better. After going through this tutorial, you will be …

Read more


Important Java Keywords List – Reserved Words In Java

keywords in Java

In this tutorial, we will Explore the Java Keywords List and learn about some Important Reserved Words, their Meaning along with Examples: Keywords in Java are the reserved words that act as a key to the code. As these words are predefined, they cannot be used for any other purpose …

Read more


Recursion In Java – Tutorial With Examples

Recursion in Java

This In-depth Tutorial on Recursion in Java Explains what is Recursion with Examples, Types, and Related Concepts. It also covers Recursion Vs Iteration: From our earlier tutorials in Java, we have seen the iterative approach wherein we declare a loop and then traverse through a data structure in an iterative …

Read more


Deque In Java – Deque Implementation And Examples

Deque In Java

This Tutorial Provides Detailed Explanation of Deque or “Double-ended Queue” in Java. You will learn about Deque Interface, API Methods, Implementation, etc: The Deque or “double-ended queue” in Java is a data structure in which we can insert or delete elements from both the ends. The deque is an interface …

Read more


Java Priority Queue Tutorial – Implementation & Examples

Priority Queue

This Tutorial Explains the Java Priority Queue and related Concepts like Comparator, Min, and Max Priority Queue along with its Implementation with Examples: Priority Queue data structure is a special queue in which the elements are present not as per FIFO order but according to the natural elements or any …

Read more


What Is Garbage Collection In Java And How Does It Work

Garbage collection in Java

This Tutorial Explains what is Garbage Collection in Java is and how does Garbage Collector work. You will also learn about Algorithms for Garbage Collection: The readers who are knowledgeable in C/C++ must be aware that it is the responsibility of the programmer to create and delete the objects in …

Read more


Java String Replace(), ReplaceAll() & ReplaceFirst() Methods

Java String - replace method

This Tutorial will Explain all about Java String Replace() Method along with ReplaceAll() and ReplaceFirst() Methods with the help of Examples: We will also explore a few scenario-based examples and frequently asked questions that will make the concept clear. Upon going through this tutorial, you will know about the replace(), …

Read more


Java Synchronized: What Is Thread Synchronization In Java

Thread synchronization in Java

This Tutorial Explains Thread Synchronization in Java along with Related Concepts like Java Lock, Race Condition, Mutex, Java Volatile & Deadlock in Java: In a multithreading environment where multiple threads are involved, there are bound to be clashes when more than one thread tries to get the same resource at …

Read more


Assertions In Java – Java Assert Tutorial With Code Examples

Assertion in Java

This Java Assert Tutorial Explains all about Assertions in Java. You will learn to Enable & Disable Assertions, how to use Assertions, Assert Examples, etc: In our earlier tutorials, we have already discussed exceptions in Java. These are the errors that are caught at runtime. Similar to exceptions there are …

Read more


Java Map Interface Tutorial With Implementation & Examples

Map Interface in Java

This Comprehensive Java Map Tutorial Covers how to Create, Initialize, and Iterate through Maps. You will also learn about Map Methods and Implementation Examples: You will get to know the basics of map interface, methods supported by map interface, and other specific terms related to map interface. Maps collection in …

Read more


Merge Sort In Java – Program To Implement MergeSort

Merge Sort In Java

This Tutorial Explains what is Merge Sort in Java, MergeSort Algorithm, Pseudo Code, Merge Sort Implementation, Examples of Iterative & Recursive MergeSort: Merge sort technique uses a “Divide-and-Conquer” strategy. In this technique, the data set that is to be sorted is divided into smaller units to sort it. => Read …

Read more


What Is NullPointerException In Java & How To Avoid It

NullPointerException

This Tutorial will explain all about the NullPointerException in Java. We will discuss the Causes of the Null Pointer Exception & ways to avoid it: NullPointerException in Java is a runtime exception. Java assigns a special null value to an object reference. When a program tries to use an object …

Read more


Java Graph Tutorial – How To Implement Graph Data Structure

Graph Data Structure

This Comprehensive Java Graph Tutorial Explains Graph Data Structure in detail. It includes how to Create, Implement, Represent & Traverse Graphs in Java: A graph data structure mainly represents a network connecting various points. These points are termed as vertices and the links connecting these vertices are called ‘Edges’. So …

Read more


Multithreading In Java – Tutorial With Examples

Multithreading in Java

This Tutorial Explains all about Multithreading In Java, Concurrency Implementation, the Life cycle of a thread, Thread Class Example, Thread using Runnable Interface: The concurrency in the computer world is the ability of a system (be it application, computer, or programming language) to execute several instances of a program or …

Read more


Thread.Sleep() – Thread Sleep() Method In Java With Examples

Thread Sleep () method in Java

In this Tutorial, we will discuss the Thread Sleep() Method in Java. We will see how does Thread.Sleep() method works with the help of Examples: The java.lang.Thread.sleep(long millis) method is the method provided by the Thread class that puts the currently running thread to sleep. We will specify the sleep time as …

Read more


How To Implement Dijkstra’s Algorithm In Java

Dijkstra’s Algorithm In Java

This Tutorial Explains how to Implement the Dijkstra’s algorithm in Java to find the Shortest Routes in a Graph or a Tree with the help of Examples: In our earlier tutorial on Graphs in Java, we saw that graphs are used to find the shortest path between the nodes apart …

Read more


Java String length() Method With Examples

Java String - length method

This Tutorial Explains all about the Java String length() Method along with Multiple Programming Examples & FAQs to help you Understand the Concept: Moreover, we will be covering the different scenarios related to the String Java length() method. Frequently asked questions related to the Java String length() method will also …

Read more


How To Use Java toString Method?

Java String - toString Method

In this tutorial, we will learn about the Java toString() method. We will take a look at the Description of the toString() Java Method along with the Programming Examples: Upon going through this tutorial, you will be able to understand the concepts of the toString() Java method and you will …

Read more


Java substring() Method – Tutorial With Examples

Java String - substring method

This Tutorial will cover the Java substring method. We will take a look at the Syntax, brief Introduction, and Java substring Examples: We will be also be covering the important scenario-based examples as well the frequently asked questions that will help you in understanding this method even better. Upon going …

Read more