code from java class