Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static void main(String[] args) throws IOException {
- String[][] users = CSVReader("./users.csv");
- //String[][] items = CSVReader("./items.csv");
- }
- public static String[][] CSVReader(String fileName) throws FileNotFoundException, IOException
- {
- String[][] mainData = new String[20][2];
- File file = new File(fileName);
- BufferedReader br = new BufferedReader(new FileReader(file));
- String st;
- int counter = 0;
- while ((st = br.readLine()) != null) {
- String[] data = st.split(",");
- mainData[counter] = data;
- counter++;
- }
- return mainData;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement