//When a method A calls another method B, 
//the program's execution jumps into B, executing its statements, 
//then jumps back to method A, at the point where the method was called.

public class MethodExample {
	public static void main (String[] args){
		message1();
		message2();
		System.out.println("Done with main.");
	}

	public static void message1() {
		System.out.println("This is message1.");
	}

	public static void message2() {
		System.out.println("This is message2.");
		message1();
		System.out.println("Done with message 2.");
	}
}

Create methodExample.java