View Single Post
  #7 (permalink)  
Old 06-06-2008, 01:03 PM
little_polarbear little_polarbear is offline
Member
 
Join Date: Jun 2008
Posts: 50
little_polarbear is on a distinguished road
Code
oh sry...
that's my code

private void Feldeintrag(String fileName, int position)
throws FileNotFoundException
{
BufferedReader in = new BufferedReader(new FileReader(fileName));
String line = null;
int a = 0;


try
{
for(int i = 0; i<= position; i++)
line = in.readLine();
a = Integer.parseInt(line);
}
catch (IOException e)
{
System.out.println("Error in reading file");
}
System.out.println("the first number of the line is: " + a);


}

and now i have a new mehod in which i wanna create an array. i asked already how to do it and i think it is kind of working, but i need an array, whose number of fields is a, which i found out in my method Feldeintrag. So i want to put a into a new method to use it as my number of fields.

little_polarbear
Reply With Quote