This is my output
{
{ d: { a e } }
{ e: { b c d } }
{ b: { a e } }
{ c: { a e } }
{ a: { b c d } }
}
I used this to_string to print this output
public final String toString() {
StringBuffer sb = new StringBuffer();
sb.append("{\n");
for (Iterator i = vertices_.values().iterator(); i.hasNext();)
sb.append(" " + i.next() + "\n");
sb.append("}");
// Arrays.sort(sb);
return sb.toString();
}
I want these in sorted order.
How should I do it?
skyyadav 0 Light Poster
stultuske 1,116 Posting Maven Featured 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.