Bunch of code examples worked out in Java.