Scanner kb = new Scanner(System.in); int input = kb.readInt(); switch (input){ case 0:... case 1:... }