pythagorean theorem code in java