work for Java class