摘要
从控制台获取数据,是一般控制台应用程序经常需要实现的一种基本功能。可以利用JDK提供的System.in、Scanner、Console等类完成功能的设计,三种不同的方法各有优缺点,在具体使用时可以根据实际情况进行合理选择。
Data capturing from console is a basic function frequently applied in normal console applications, and this func- tion can be implemented by one of the following classes afforded by JDK: System.in, Scanner, Console. The three different methods will have their own advantages and disadvantages. In the real application, the most suitable method can be chose based on the specific requirements from this application.
出处
《电脑编程技巧与维护》
2009年第6期65-65,71,共2页
Computer Programming Skills & Maintenance