/** * This program checks to see that the user * entered the right number of arguments. * * After compiling, run with: * $ java SumSome6 2 3 */ class SumSome6 { public static void main(String[] args) { if (args.length != 2) { System.out.println("You need to enter two numbers!"); System.exit(1); } int x = Integer.valueOf(args[0]); int y = Integer.valueOf(args[1]); System.out.println(x + y); } }