View Single Post
Old Apr 5th, 2008, 3:08 PM   #5
titaniumdecoy
Expert Programmer
 
titaniumdecoy's Avatar
 
Join Date: Nov 2005
Posts: 843
Rep Power: 3 titaniumdecoy is on a distinguished road
Send a message via AIM to titaniumdecoy
Re: Using ctrl+d to end input

Using Scanner's nextDouble() and hasNextDouble() methods will obviate the need to manually parse each double.

An EOFException is thrown when the end of a file is encountered.
titaniumdecoy is offline   Reply With Quote