/** * Output: num is 3.141593 */public class MainClass { public static void main(String args[]) throws Exception { System.out.printf("num is %f\n", Math.PI ); }}