Sample code

Sample code in java