adding type for java code