public static void main(String[] args) throws IOException { boolean backAndforth = true; BufferedReader stdin = new BufferedReader(new InputStreamReader(System.in)); while (input != ".") { System.out.print("Enter an adjective (all lower-case) or type . to exit:"); System.out.flush(); input = stdin.readLine(); if (backAndforth) { System.out.println("(using SimpleString) " + input + " -- " + comparative(new SimpleString(input))); backAndforth = false; } else { System.out.println("(using CharArray) " + input + " -- " + comparative(new CharArray(input))); backAndforth = true; } } }