I have a comma separated CSV file contains NASDAQ symbols . I use Scanner to read a file
s = new Scanner(new File(\"C:\\\\nasdaq_companylist.csv\")).useD
Your safest bet is you use csv parsing library. Your comma is enclosed in quotes. You'd need to implement logic to look for quoted commas. However you'd also need to plan for other situations, like quote within a quote, escape sequences etc. Better use some ready for use and tested solution. Use google, you'll find some. CSV files can be tricky to use on your own.