001package edu.pdx.cs410J.j2se15;
002
003import static java.lang.Integer.*;
004import static java.lang.System.*;
005
006/**
007 * Demonstrates J2SE's "static import" facility.
008 *
009 * @author David Whitlock
010 * @version $Revision: 1.1 $
011 * @since Summer 2004
012 */
013public class StaticImports {
014
015  /**
016   * Prints the sum of the integers entered on the command line
017   */
018  public static void main(String[] args) {
019    int sum = 0;
020    for (int i = 0; i < args.length; i++) {
021      sum += parseInt(args[i]); // Integer.parseInt()
022    }
023
024    out.println("Sum is " + sum); // System.out
025    out.println("MAX_INT is " + MAX_VALUE); // Integer.MAX_VALUE
026  }
027
028}