Category Archives for Java

Java: Add Items to a Linked List Examples

In this blog post, I’m going to show you the different ways to add items to a Java LinkedList. The Java LinkedList is implemented as a Doubly LinkedList. Here is the class hierarchy of the LinkedList: Creating

Continue reading

Sorting Java Collections

Sorting collections is a common task that Java developers deal with on a daily bases.  The Java Collections class provides us with two sort() methods to sort all collections that implement the List interface. Sorting

Continue reading

Iterating Over Collections In Java

Iteration is the most common operations done on a collection. For example, you may want to go through all the student grades to find who has the highest test scores. In Java we have four methods for iterating

Continue reading

Is String A Palindrome?

Problem You are given a string and are asked to write a method to return true if the string is a palindrome and to return false otherwise. A palindrome is a string that reads the same from front to back

Continue reading

Using SDKMAN To Manage Java Versions

What Is SDKMAN? As Java developers, we have to work with different versions of Java from project to project. Installing different versions by hand and setting the PATH can become a real pain at times. SDKMAN is

Continue reading