java - How to read full line while using line split? -
bufferedreader tableread = new bufferedreader(new filereader(tablefile)); while ((tableline = tableread.readline()) != null){ cnamedata = tableline.split(","); (int =0; i< cnamedata.length; i++){ system.out.println(cnamedata[i]); } } this code in mind takes line example, john, 23, male, , splits , puts array cnamedata, when prints out gives 23 , male only, how insert john array? in advance.