begins with "{and ends with "in javaany set of statements between the braces "{and "}define program block as with the universe classthe counter class is publicwhich means that any other class can create and use counter object the counter has one instance variable-an integer called count this variable is initialized to in the constructor methodcounterwhich is called when we wish to create new counter object (this method always has the same name as the class it belongs tothis class also has one accessor methodgetcountwhich returns the current value of the counter finallythis class has two update methods-- methodincrementcountwhich increments the counterand methoddecrementcountwhich decrements the counter admittedlythis is pretty boring classbut at least it shows us the syntax and structure of java class it also shows us that java class does not have to have main method (but such class can do nothing by itselfthe name of classmethodor variable in java is called an identifierwhich can be any string of characters as long as it begins with letter and consists of lettersnumbersand underscore characters (where "letterand "numbercan be from any written language defined in the unicode character setwe list the exceptions to this general rule for java identifiers in table table listing of the reserved words in java these names cannot be used as method or variable names in java reserved words abstract