Why is it allowed to make a non-static reference from static object?
<p>Here is an example: </p>

<pre><code>public class Test extends Activity {

    Button button;
    public int i;
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        button = (Button) findViewById(R.id.Button01);
        button.setOnClickListener(new View.OnClickListener() {

            @Override
            public void onClick(View v) {
                i = 10; // How can this be possible?
            }
        });
    }
}
</code></pre>
