Cube Function In Java