Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

java read integer from text file into array scanner

Scanner scanner = new Scanner(new File("input.txt"));
int [] tall = new int [100];
int i = 0;
while(scanner.hasNextInt())
{
     tall[i++] = scanner.nextInt();
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #java #read #integer #text #file #array #scanner
ADD COMMENT
Topic
Name
1+7 =