Can some explain what this code means in Java?
<p>There's a program I'm looking at and it contains a line that I don't understand.</p>

<pre><code>NoticeBoard notice = (NoticeBoard) o;
</code></pre>

<p>What is that piece of code doing?</p>

<p>That line is taken from here (posting this because you guys might want to understand the full context of the line):</p>

<pre><code>import java.util.Observable;
import java.util.Observer;

class NoticeBoard extends Observable
{
    private String theNotice = "";
    public void setTheNotice( final String notice )
    {
        theNotice = notice;
        setChanged();
        notifyObservers();
    }

    public String getTheNotice()
    {
        return theNotice;
    }
}

class NoticeBoardObserver implements Observer
{
    public void update( Observable o, Object arg )
    {
        NoticeBoard notice = (NoticeBoard) o;
        System.out.println( notice.getTheNotice() );
    }
}

class Main
{
    public static void main( String args[] )
    {
        NoticeBoard floor4 = new NoticeBoard();
        NoticeBoardObserver anObserver = new NoticeBoardObserver();
        floor4.addObserver( anObserver );
        floor4.setTheNotice( "Its summer" );
    }
}
</code></pre>
