How to read a String (file) to array in java -
suppose there file named sun.txt
file contains : a,b,dd,ss,
i want make dynamic array depending upon number of attributes in file. if ther char after comma array of 0-4 i.e of length 5. in above mentioned case there no char returns 0-3 array of length 4. want read null after comma too.
how do that?
sundhas
you should think about
- reading file string
- splitting file separator ','
- using list adding characters , convert list array, when list filled
Comments
Post a Comment