Unable to understand declaration
<p>I have a code snippet as</p>

<pre><code>public class ThreadStates {
    private static Thread t1 = new Thread("T1") {
        public void run() {
            try {
                sleep(2);
                for (int i = 100; i &gt; 0; i--) ;
            } catch (InterruptedException ie) {
                ie.printStackTrace();
            }
        }
    }
}
</code></pre>

<p>.......And rest of code follows.</p>

<p>What type of declation is step 1. I can see that we have no inherited Thread class in ThreadStates class, then why run() method declaration is coming.  PLease clarify what is happening.    </p>
