class to java