java code Samples