BufferedReader readTxt=new BufferedReader(new FileReader(new File("text.txt")));
String textLine="";
String str="";
while(( textLine=readTxt.readLine())!=null){
str+=" "+ textLine;
}
String[] numbersArray=str.split(" ");
//numbersArray下保存的即为各个数字