Java Programming Tutorials

Java programming tutorials with many code examples!

Maven dependency to local JAR

Did you ever need to configure Maven dependency to local JAR? It’s rarely needed, but when it is, it’s good to know how to do that correctly.

Read More

Share with the World!

Java casting trick

Recently I’ve rediscovered Class.cast(object) that can be used to cast objects to a type. In Java 8 streams the method allows to do a nice Java casting trick.

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!

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!
Pages:1234567...21