import java.io.*; class UseCharListsA4 { // A program which reads and writes lists of characters // in their conventional form. public static void main(String[] args) throws IOException { BufferedReader in = new BufferedReader( new InputStreamReader(System.in)); CharListA L1,L2; try { System.out.print("Enter first list of characters: "); L1 = CharListAIO.read(in); System.out.print("Enter second list of characters: "); L2 = CharListAIO.read(in); System.out.print("The lists are: "); CharListAIO.print(L1); System.out.print(" and "); CharListAIO.print(L2); System.out.println(); } catch(ListFormatException e) { System.out.println("Error: "+e.getMessage()); } } }