[Solved] How to count the number of characters in a line in a csv file
I suggest you to read the javadoc of String.split. I think that you misunderstood the concept when you did this: String[] f=line.split(“,”); a[count]=Integer.parseInt(f[2]); //–> java.lang.NumberFormatException here! Avoid using ‘magic’ numbers in your code like int[] a = new int[24];. Why 24? Well, here comes a version that do what you want to do. Maybe it … Read more