public class RecursivePrint2 { public static void main(String[] args) { //Print the integers from 1 to 10 inclusive. f(1, 10); System.exit(0); } //Print the integers from start to end inclusive. private static void f(int start, int end) { if (start <= end) { System.out.println(start); f(start + 1, end); } } }