public class MainClass { public static void main(String[] args) { System.out.printf("Decimal/Scientific: %G\n", Math.PI); } } Decimal/Scientific: 3.14159