example for a java code