Sunday, January 17, 2010
Parsing String using JAVA
Write a java program that takes as input (on System.in) a sequence of lines of text (consisting of left-/right-parentheses, alphanumeric characters and spaces) and then produces as output a sequence of the “token” “(words) one-per-line in the order they exist in the input. Each token should consist of either a single left- or right-parenthesis, a sequence of. You may wish to make use of the methods in the java.util.Scanner and java.lang.String.
Subscribe to:
Posts (Atom)