// A scope example import java.awt.*; import java.applet.*; public class scope extends Applet { int x = 1; // instance variable public void paint( Graphics g ) { int x = 5; // local variable System.out.println("A. x = " + x); a(); b(); a(); b(); System.out.println("B. x = " + x); } void a() { int x = 25; // local variable System.out.println("C. x = " + x); x++; System.out.println("D. x = " + x); } void b() { System.out.println("E. x = " + x); x *= 10; System.out.println("F. x = " + x); } }