class Cat { public static void main(String[] args) throws java.io.IOException { int c; // doit être de type int c = System.in.read(); // lecture du premier caractère while (c != -1) { // test de la fin de l'entrée System.out.write(c); // écriture du caractère c = System.in.read(); // lecture du caractère suivant } System.out.flush(); // force le vidage du tampon de sortie } }