public class squares3 { public static void main( String[] args ) { int sumSquares = 0; for (int index = 1; index <= 10; index ++) { sumSquares = square( index, index+1); System.out.println(index+" The sum of squares of "+index+" and "+(index+1) +" is "+ sumSquares); // System.out.println("The values of a & b are "+ a + " and " + b); } System.exit(0); } // end of main // square method declaration follows: public static int square( int x, int y ) { int a, b; a = x * x; b = y * y; return (a+b); } // end of method square } // end of class squares3