/* This program "Adder" will find the sum of 2 integers, and print the * result to the screen. This is a relatively simple program, requiring * only one class (file). Within the main() function we see the 3 classic * parts to a typical program: input, calculations, output. */ public class Adder { public static void main(String [] args) { // Step 1 -- (input) Set the values of the 2 numbers we want to add. int first = 14; int second = -8; // Step 2 -- Perform calculations. int sum = first + second; // Step 3 -- Output result of calculations. System.out.printf ("The sum of %d and %d is %d\n", first, second, sum); } } /* Example I/O when we run the program: * The sum of 14 and -8 is 6 */