Example: The Physical Constants

The value of the physical constant PI is printed.

import com.imsl.math.*;

public class PhysicalEx1 {

    public static void main(String args[]) {
        System.out.println("The value of the physical constant PI is "
                + Physical.constant("PI"));
    }
}

Output

The value of the physical constant PI is 3.141592653589793
Link to Java source.