I was looking at this example and was wondering what the first line does:
private SiteStreamsListener listener = new SiteStreamsListener() {
It looks like you can declare additional methods or override methods in this manner. Could I, for example, do the following?
ArrayList myList = new ArrayList() {
@Override String toString()
{
<my code here>
}
<insert new methods here>
}