Java Programming Tutorials

Java programming tutorials with many code examples!

Linked List add element at the end

Linked List is a simple data structure. Implementing it from scratch helps to understand its properties. We’ll implement Linked List add, size, and print its contents.

Read More

Share with the World!

Create Java Streams

There are many ways to create Java Streams and for each of them we’ll show examples. This flexibility is needed especially when combined with flatMap!

Read More

Share with the World!

Floyd Cycle detection in Java

One of the best known algorithms to detect a cycle in a linked list is Floyd Cycle detection. Using Floyd’s algorithm we can detect cycle, its beginning, and length.

Read More

Share with the World!

Shuffle Algorithm in Java

Shuffling of arrays/lists sounds like a trivial task, but in reality it’s full of subtle traps. Here we show how to implement Fisher-Yates Shuffle Algorithm in Java.

Read More

Share with the World!

MD5 hash in Java

To calculate MD5 hash in Java we can use pure Java approach or use libraries. In this post we’re going to show how to calculate Message Digest in different ways.

Read More

Share with the World!

Java regex matching IP Address

A pretty cool exercise in writing Java Regular Expressions is to write Java regex matching IP Address. In this post we’ll show IP regexp and use in IP Address validator.

Read More

Share with the World!
Pages:1234567...20