// Helene Martin, CSE 142 // Demonstrates using math methods and type casting public class MathDemo { public static void main(String[] args) { System.out.println(Math.pow(6, 2)); int power = (int)Math.pow(6, 4); System.out.println("My favorite power: " + power); int rounded = (int)Math.round(439384.333333); int age = -34; int fixedAge = Math.max(age, 0); fixedAge = Math.min(40, fixedAge); System.out.println("Fixed age: " + fixedAge); } }