public class Thing { public static int a = 5; // class variable public int b = 0; // instance variable public Thing (int initb) { b = initb; } public static void scale (int s) { // class method a = a*s; } public int f (int x) { // instance method return a*x + b; } public static void main (String[] args) { Thing thing1 = new Thing(1); Thing thing2 = new Thing(2); System.out.println("thing1.f(10)=" + thing1.f(10) + "; thing2.f(10)=" + thing2.f(10)); scale(2); System.out.println("thing1.f(10)=" + thing1.f(10) + "; thing2.f(10)=" + thing2.f(10)); } }