Return types of methods
// Return the sum of the squares of the fields
public int sumSquares() {
return x*x + y*y;
}
sumSquares should return an integer to wherever it is called from
Previous slide
Next slide
Back to first slide
View graphic version