正在加载图片...
iterators The fact that a Scanner is an iterator is particularly helpful when reading input from a file Suppose we wanted to read and process a list of URIs Stored in a file One scanner can be set up to read each line of the input until the end of the file is encountered Another scanner can be set up for each URL to process ceach part of the path See URLDissector java(page 161) 28 JAVA28 Iterators • The fact that a Scanner is an iterator is particularly helpful when reading input from a file • Suppose we wanted to read and process a list of URLs stored in a file • One scanner can be set up to read each line of the input until the end of the file is encountered • Another scanner can be set up for each URL to process each part of the path • See URLDissector.java (page 161)
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有