Added example in Java.
Ignore .idea folder