Added some examples to java