/* This program will demonstrate some of the methods in the Math class. */ class Mathdriver{ public staatic main(String [] args){ double rand = Math.random() System.out.println("You generated " + rand): x = Math.sqrt(16.0); System.out.println("The square root of 16 is " + x); int base = 5; int exponent = 3; int result = Math.pow((base + 1), exponent); System.out.println(" 6 to the 3rd power is " + result); } }