public class PrintMethod{ public static void printMethod(String msg, int x){ if (x>0){ System.out.println("x = " + x + " " + msg); printMethod(msg,x-1); return; } } public static boolean alphaPrint(String s1, String s2, String s3){ if (s1.compareTo(s2) > 0 && s1.compareTo(s3) < 0 ){ System.out.println(s1); return true; } else { return false; } } public static void main(String[] args){ printMethod("UNB",4); alphaPrint("foo","bar","fubar"); } }