overview objects here' the amazing breakthrough that is the key to oopan object contains both methods and variables thermostat objectfor examplewould contain not only furnace_on(and furnace_off(methodsbut also variables called currenttemp and desiredtemp in javaan object' variables such as these are called fields this new entitythe objectsolves several problems simultaneously not only does an object in program correspond more closely to an object in the real worldbut it also solves the problem engendered by global data in the procedural model the furnace_on(and furnace_off(methods can access currenttemp and desiredtemp these variables are hidden from methods that are not part of thermostathoweverso they are less likely to be accidentally changed by rogue method classes you might think that the idea of an object would be enough for one programming revolutionbut there' more early onit was realized that you might want to make several objects of the same type maybe you're writing furnace control program for an entire apartment buildingfor exampleand you need several dozen thermostat objects in your program it seems shame to go to the trouble of specifying each one separately thusthe idea of classes was born class is specification-- blueprint--for one or more objects here' how thermostat classfor examplemight look in javaclass thermostat private float currenttemp()private float desiredtemp()public void furnace_on(/method body goes here public void furnace_off(/method body goes here /end class thermostat the java keyword class introduces the class specificationfollowed by the name you want to give the classhere it' thermostat enclosed in curly brackets are the fields and methods that make up the class we've left out the bodies of the methodsnormallyeach would have many lines of program code