I have a TreeSet and I'm printing it using
System.out.println(myTreeSet)
I've overwritten the toString of the stored class to this:
public String toString()
{
return getAddress() + " : ?" + askingPrice + " : " + getClass() + System.getProperty("line.seperator");
}
As you can see I'm trying to add in a newline at the end so each element of my TreeSet is printed on a newline. However, all this does is puts a null in place of the line seperator.
Is it possible to put the line break there, 'cos it's looking very messy ATM.