答案 0 :(得分:2)
Checkout扫描仪用于读取文本文件: http://docs.oracle.com/javase/7/docs/api/java/util/Scanner.html
检查StringTokenizer以解析字符串: http://docs.oracle.com/javase/7/docs/api/java/util/StringTokenizer.html
Checkout String的拆分方法: http://docs.oracle.com/javase/6/docs/api/java/lang/String.html
以下是一些例子, http://www.javapractices.com/topic/TopicAction.do?Id=42