How to read only integers from a file in java? Suppose the file has something like this:
(14,2,3),(2,3,4)
(2,6,78)
Now I want to read only the integers not the brackets and commas.How do I do it?
kangkan_14
0
Newbie Poster
Recommended Answers
Jump to PostUse the Scanner class. There are tons of different ways you can do this with the methods in there, some involving regular expressions/Pattern, some with only the basic Scanner methods.
All 3 Replies
Reply to this topic
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.