Sample code for java training