~java public String readLine() { StringBuffer buffer = new StringBuffer(); int lg = 0, car = -1; try { while(true) { car = System.in.read(); if ((car < 0) || (car == '\n')) break; buffer.append((char)car); } } catch (IOException e) { return (null); } if ((car < 0) && (lg == 0)) return (null); return buffer.toString().trim(); }