Can the code be executed before the main() method, in java? THX
<pre><code>class Cup{
    Cup(int marker){
        System.out.println("Cup("+marker+")");
    }
}

public class st{
    Cup cup1=new Cup(1);
    public static void main(String[] args){
        System.out.println("inside main()");
        Cup cup1=new Cup(2);
    }
}
</code></pre>

<p>why <code>Cup cup1=new Cup(1);</code> this line of code won't be executed? why do i have to add static?</p>
