Added Java class for number operations