/** abcd.java - This is a modular Java program that features functions * (static methods) calling other functions. Can you figure out the * output? At any given point, the program needs to know where it is * in its nested function calls. When a function returns, it should be * no mystery where to return to. We can draw a function instance graph * to depict the relationship among all function calls. */ public class abcd { public static void main(String [] args) { a(); System.out.printf("\n"); b(); System.out.printf("\n"); c(); System.out.printf("\n"); d(); System.out.printf("\n"); } public static void a() { System.out.printf("a"); } public static void b() { a(); System.out.printf("b"); } public static void c() { a(); b(); System.out.printf("c"); } public static void d() { a(); b(); c(); System.out.printf("d"); } }