Java sample in the work