Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- JohntSmitht23
- JamestJonest21
- String str;
- int row = 0;
- String array[][];
- while ((str = br.readLine()) != null) {
- array[row] = str.split("t");
- System.out.println(array[row][0]);
- row++;
- }
- int rowCount = ...;
- String array[][] = new String[rowCount][];
- List<String[]> list = new ArrayList<String[]>();
- String str;
- while((str = br.readLine()) != null)
- {
- String[] array = str.split("t");
- list.add(array);
- }
- String[][] array2D = new String[list.size()][];
- list.toArray(array2D);
- List<List<String>> array = new ArrayList<List<String>>();
- while ((str = br.readLine()) != null) {
- array.add(Arrays.asList(str.split("t")));
- }
- final int SIZE = ...; //some value that would be the max size of the array of arrays
- String array[][] = new String[SIZE][];
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement