I recommend using a List instead of an array for this operation, assuming you don't already know the number of entries that will be recorded from the file as input.
import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
public class Stuff {
public static List fillarray(String filename)
{
List<Integer> arrs = new ArrayList<Integer>();
try
{
FileReader fr = new FileReader(filename);
BufferedReader inputStream = new BufferedReader(fr);
String line = null ;
while((line = inputStream.readLine()) != null)
{
System.out.println(line);
arrs.add(Integer.parseInt(line)) ;
}
inputStream.close();
}
catch(IOException e)
{
System.out.print("Error in Reading the file");
}
return arrs;
}
}
p.s. formatting is important, make it a habit now while your learning the language