Example Java code