Yes. Exactly the same as for HashMap except that it's already sorted.
Have a look at the methods for TreeMap in the API documentation. You will find all kinds of methods for getting the keys, the values, iterators for looping through them etc. You can use those methods to access your data any way you want so you can send it to a file any way you want.
We all start by learning arrays, but in real life its much more common to use Lists and Maps etc because these are more powerful and easier to work with. You'll learn all about them sooner or later...
JamesCherrill 4,733 Most Valuable Poster Team Colleague Featured Poster
drogba123 0 Junior Poster
JamesCherrill 4,733 Most Valuable Poster Team Colleague Featured Poster
drogba123 0 Junior Poster
JamesCherrill 4,733 Most Valuable Poster Team Colleague Featured Poster
drogba123 0 Junior Poster
drogba123 0 Junior Poster
mKorbel 274 Veteran Poster
drogba123 0 Junior Poster
mKorbel 274 Veteran Poster
JamesCherrill 4,733 Most Valuable Poster Team Colleague Featured Poster
drogba123 0 Junior Poster
JamesCherrill 4,733 Most Valuable Poster Team Colleague Featured Poster
drogba123 0 Junior Poster
JamesCherrill 4,733 Most Valuable Poster Team Colleague Featured Poster
drogba123 0 Junior Poster
JamesCherrill 4,733 Most Valuable Poster Team Colleague Featured Poster
drogba123 0 Junior Poster
JamesCherrill 4,733 Most Valuable Poster Team Colleague Featured Poster
jon.kiparsky commented: Your patience is admirable. +2
drogba123 0 Junior Poster
mKorbel 274 Veteran Poster
JamesCherrill 4,733 Most Valuable Poster Team Colleague Featured Poster
drogba123 0 Junior Poster
JamesCherrill 4,733 Most Valuable Poster Team Colleague Featured Poster
kekkaishi commented: such patience. kudos. :D +2
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.