// Filename Synch.java // // Written for JFL book Chapter 8 see text. // Fintan Culwin, v0.1, January 1997 // Modified by X. Meng to include synchronized actions // mar-25-1998 public class Synch extends Object { private int anAttribute; private int anotherAttribute; public synchronized void update( int updateTo ) { anAttribute = updateTo; anotherAttribute = updateTo; } // End update public int getAnAttribute() { return anAttribute; } // End getAnAttribute public int getAnotherAttribute() { return anotherAttribute; } // End getAnotherAttribute } // End Synch.