hi i need to convert my comma seperated text file in to a two dimensional array and i should be able to access each element in that array....i tried so many programs based on read line and split functions but i didn't get the proper output....please help me to do this..
abinaya.lingam
0
Newbie Poster
Recommended Answers
Jump to PostPlease post the code you are having problems with, your questions and the full text of the error messages.
Jump to PostPost the work you have done so far.
What you could do is read the file, line by line into a String. Then use split to remove the commas and put it into an array.
String line = "Apples,bananas,oranges"; String[] dataArray = line.split(",");
The above uses …
All 5 Replies
NormR1
563
Posting Sage
Team Colleague
paul9519
0
Newbie Poster
Starstreak
13
Light Poster
Priti_P
0
Junior Poster
JamesCherrill
4,733
Most Valuable Poster
Team Colleague
Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.