import java.lang.Math; /** * This class illustrates various uses of the static keyword * using the Math class */ public class StaticExamples{ public static void main(String[] args){ System.out.println("Identify these math constants:"); System.out.println("\t" + Math.PI); System.out.println("\t" + Math.E); System.out.println(); int var1 = -100, var2 = -99; System.out.println("Max of " + var1 + " and " + var2 + " is " + Math.max(var1, var2)); System.out.println("Min of " + var1 + " and " + var2 + " is " + Math.min(var1, var2)); System.out.println(); System.out.println("Absolute value of " + var1 + " is " + Math.abs(var1)); System.out.println("Absolute value of " + var2 + " is " + Math.abs(var2)); } }