Java Programming Tutorials

Java programming tutorials with many code examples!

Clojure switch case

One of the first control flow statements in many programming languages is switch-case. In Clojure switch case can be achieved in different ways, which we will show in this post.

Read More

Share with the World!

Java Enumeration to List

Problem:

When using legacy libraries sometimes you need to convert Java Enumeration to List to use it with modern code it comfortable way. Again Java Collections API comes to the rescue!

Read More

Share with the World!

Java List sublist

Problem:

How to find a first/last occurrence of sublist in Java List? As expected Java Collections API has a method for this. See the example for details.

Read More

Share with the World!

Java Collection to Enumeration

Problem:

When working with legacy code, you need to convert Java Collection to Enumeration. This example shows how to do that using Java Collections API features!

Read More

Share with the World!

Java list replace/fill elements

Problem:

Sometimes we want on Java List replace/fill all/selected elements. It can be done manually, but much better way is to reuse Java Collections API. See how!

Read More

Share with the World!

Java find/count occurrences

Problem:

Sometimes you have to in Java find/count occurrences of objects inside a Java Collection. It can be done manually, but vast Java Collections API provides a better way.

Read More

Share with the World!

Java contains any

Problem:

How to check that a collection in Java contains any of elements from some other collection? It’s very common problem when working on Sets, but also applicable to Java Lists and other collections.

Read More

Share with the World!

Java List copy

Problem:

There is a number of ways do to Java List copy. Which one is best? Which one apply to your situation at hand? In this post you will find this out!

Read More

Share with the World!