hello !
im trying to read few numbers from a file and but each line of numbers in diffrent array
now i can read the numbers but in one array
any help
here is the code
public static void main(String[] args) throws IOException {
File number = new File ("numbers.txt");
number.createNewFile();
Scanner in = new Scanner(number);
int [] no = new int [12];
int count =0; // count for number of elements in the file
while (in.hasNextInt())
{
no [count] = in.nextInt();
count++;
}
for (int i=0 ; i<no.length;i++){
System.out.println(no[i]);
}
}
}