public static short lireShort(){ while (true) { try { System.out.println("entrez un short"); Scanner sc = new Scanner(System.in); return sc.nextShort(); } catch (InputMismatchException e) { System.err.println("ceci n'est pas un short"); } } }