char[]name; try { ... name = new char[count]; ... } catch(IOException e) { ... } System.out.print(name);