TestScope.java

The example:
		
/*filename:TestScope.java */
import java.awt.*;
import java.applet.Applet;
class TestScope extends Applet
{
  	  static int x = 1;
	  public void paint( Graphics g ) 
	  {
            int x = 0;
	    g.drawString("x=" + x,30, 30);
	    g.drawString("TestScope.x=" + Test.x,30, 50);
	  }
}
<!--filename:TestScope.html-->
<applet code="TestScope.class" width=180 height=60>
</applet>
produces the output:

x=0 TestScope.x=1
This example declares: