Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static String[][] leesGegevens(String bestandsnaam)throws IOException{
- BufferedReader in = new BufferedReader(new FileReader(bestandsnaam+".txt"));
- int M = Integer.parseInt(in.readLine());
- int N = Integer.parseInt(in.readLine());
- int I = -1;
- int J = -1;
- String[][] mleesin = new String[M][N];
- for (int i = 0; i<M; i++){
- I=I+1;
- for (int j = 0; j<N; j++){
- String C = in.readLine();
- if(C.equals(" "));
- else{
- J=J+1;
- mleesin[I][J] = C;
- }
- }
- }return mleesin;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement