hey guys so i am having a problem in my assinghmnet . i am making a text file and it has to import to java and make a table from the text file .
so there is what the txt file looks.
3 // this should be the rows 1,2,3,
3 // this should be the col 1,2,3,
5
1 2
3
2 2
3 2
0 0// this should exit it//
so , how do i make write a code that would read this text file and make it like a table?
thank you in advance
java123456
0
Newbie Poster
Recommended Answers
Jump to PostThink about it and come up with something yourself. We need to have proof of your efforts in order to help you.
Show us what you've done so far and we'll help you from there...
Jump to PostOkay, that's good... now to read from that file line-by-line, you can do something like:
String line = ""; while (txtFile.hasNextLine()) { line = txtFile.nextLine() }
But, now think of how you'd read the data to facilitate your problem. Maybe after reading a particular line, you …
All 6 Replies
NP-complete
42
Junior Poster
java123456
0
Newbie Poster
NP-complete
42
Junior Poster
java123456
0
Newbie Poster
jalpesh_007
-3
Newbie Poster
subramanya.vl
0
Junior Poster in Training
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.