Sample rules for java class and example