Unformatted text preview: Examples: • All the methods in the Math class built into Java are static methods: • Math class is in the java.lang package. double x = Math.pow(4, 0.5); // sqrt root of 4 int y = Math.max(3, 5); // maximum of 3 , 5 • Some of the static fields in Math : Math.PI; //public static final double PI Math.E; //public static final double E Hold down your control key + C key to follow the link to Java Platform Standard Ed. 6 and scroll down the lower left hand pane to find the Math class and click on it for more methods in that class. Overview (Java Platform SE 6) http://java.sun.com/javase/6/docs/api/...
View Full Document
- Spring '08
- Object-Oriented Programming, Subroutine, Control key, Static Methods, static fields