All posts by admin

openCV – Android app

This a post from a guy that have just used openCV libraries directly on Android. Brilliant! Thank you for your post, Elvis Chidera

For those who doesn’t know what openCV is or what is it for, openCV is the most popular opensource library that allows you to manipulate images, like identifying objects and so on.

If you need that on your android app, take a look on this post.

Java 8 – Some of the new features



…and here are the results from running the file above


Thank you! 🙂


Design Pattern: Command and State together

In this article we will explain two JAVA design patterns:
Command and State.

In the main method we:

  1. first create the light object (aka receiver);

So lets start with the  code:



The Command Design Pattern implementation
Here we define our Command interface


This is the remote control class.




The next section is the State Design Pattern part








And the results:


And that’s it. Feel free to comment.

Thank you!

Working with nested Maps in JAVA

In this post I will show you a simple and easy way of working with JAVA Maps, more precisely, how to add an element (a.k.a value) to a multi nested maps:

That’s it. Simple, isn’t it? 😉

Source code: github

Builder Design Pattern

Here is the “usual” implementation of this design pattern.


The result is:




Builder Design Pattern (simple way)



So, let’s start creating a car!


The final result:


Singleton Design Pattern


  1. The Singleton class:


2. The main class:


3. The result:




Reverse String/array recursively

Here is an example how to recursively invert the order of a string or an array in Java.

The output is:


Notice that in the string method we have twice the iterations that we have in the array method, because we go through all positions in the string.

If you know other ways of doing it, please feel free to comment it out.