consider the following examplesoven cookdinner()oven cookdinner(food)oven cookdinner(foodseasoning)each of these method calls is actually referring to different method with the same name defined in the class that oven belongs to notehoweverthat the signature of method in java does not include the type that the method returnsso java does not allow two methods with the same signature to return different types instance variables java classes can define instance variableswhich are also called fields these variables represent the data associated with the objects of class instance variables must have typewhich can either be base type (such as intfloatdoubleor reference type (as in our remote control analogy)that isa classsuch as string an interface (see section )or an array (see section base-type instance variable stores the value of that base typewhereas an instance variable declared with class name stores reference to an object of that class continuing our analogy of visualizing object references as remote controlsinstance variables are like device parameters that can be read or set from the remote control (such as the volume and channel controls on television remote controlgiven reference variable vwhich points to some object owe can access any of the instance variables for that the access rules allow for examplepublic instance variables are accessible by everyone using the dot operator we can get the value of any such instance variableijust by using in an arithmetic expression likewisewe can set the value of any such instance variable,iby writing on the left-hand side of the assignment operator ("="(see figure for exampleif gnome refers to gnome object that has public instance variables name and agethen the following statements are allowedgnome name "professor smythe"gnome age alsoan object reference does not have to only be reference variable it can also be any expression that returns an object reference figure illustrating the way an object reference can be used to get and set instance variables in an