example for java