public class MainClass { public static void main(String[] argv) { System.out.println(test(1)); System.out.println(test(2)); System.out.println(test(3)); System.out.println(test(4)); } static String test(int n) { String tmp = "?"; if (n < 3) n--; switch (n) { case 1: return "one"; case 2: n = 3; case 3: break; case 4: default: return tmp; } return "Result " + n; } }