public static void main(String[] args) throws IOException { String input; while (true) { System.out.print("Enter string containing delimiters: "); System.out.flush(); input = getString(); // read a string from kbd if (input.equals("")) // quit if [Enter] break; // make a BracketChecker BracketChecker theChecker = new BracketChecker(input); theChecker.check(); // check brackets } // end while } // end main()
public static void main(String[] args) { String input; input = args[0]; BracketChecker Stringchecker = new BracketChecker(input); Stringchecker.check(); }