public class Scope{ // The variables below (x and y) are global variabes // All three methods (Scope, test and main) have access to x and y private static int x = 10; private int y; public Scope(int y){ this.y = y; } public void test() { int x = 20; // local variable - valid only for the test method int y = 20; // local variable - valid only for the test method System.out.println("x = " + x); System.out.println("y = " + y); multiply(y); System.out.println("this.y = " + this.y); System.out.println("Scope.x = " + Scope.x); } public void multiply(int y){ this.y = y * 10; } public static void main (String args[]){ Scope s = new Scope (10); s.test(); } }