/* An example of a non-void method: a function that computes the sum of its two arguments and returns it. Laura Toma csci 107 */ public class Sum { public static void main (String args[]) { ReadStream r = new ReadStream(); int a, b; System.out.print("Enter two numbers: "); a = r.readInt(); r.readLine(); b = r.readInt(); r.readLine(); System.out.println("The sum is: " + computeSum(a,b)); } //end of main /* This method computes and returns the sum of its arguments */ public static int computeSum(int x, int y) { int s; s = x + y; return s; } //end of computeSum } // end of class