Having trouble with a small example from school
<p>The example is from a course, it's for comparing two objects in java:</p>

<pre><code>public class Complex {

    ...

    public boolean equals (Object obj) {
        if (obj instanceof Complex) {    // if obj is "Complex" (complex number) 
            Complex c =  (Complex) obj   // No idea
            return (real == c.real) &amp;&amp; (imag == c.imag); 
            // I'm guessing real means [this].real
        }
        return false;
    }
}
</code></pre>

<p>So, my question is: "what does this: <code>Complex c =  (Complex) obj</code> actually mean" ?</p>

<p>Also I've worked with python and c++, java is new for me.</p>
