// A program from Chapter 11 of Sams Teach Yourself Java in 24 Hours // by Rogers Cadenhead, http://www.java24hours.com/ package com.java24hours; public class Gremlin2 { static int gremlinCount = 0; private int guid; public Gremlin2() { gremlinCount++; } public void setGuid(int newGuid) { if (newGuid > 999_999 & newGuid < 10_000_000) { guid = newGuid; } } public int getGuid() { return guid; } static int getGremlinCount() { return gremlinCount; } }