can someone help me understand what i'm doing wrong here. attempted to run, program builds but no output is generated and the compiler does'nt generate an error message.
thank you all.
import java.util.Scanner;
import java.io.*;
import java.util.ArrayList;
public class arrayManipulator
{
public static void main(String[] args) throws IOException
{
ArrayList<Integer> myArray = new ArrayList<Integer>();
Scanner s = null;
try
{
s = new Scanner(new BufferedReader (new FileReader("usrnames.txt")));
while(s.hasNext())
{
if(s.hasNextInt())
{
for(int i=0; i<myArray.size(); i++)
{
myArray.set(i, s.nextInt());
System.out.print(" "+myArray.get(i));
}
}
}
}
finally
{ s.close();
}
}