import ta measures thermometerimport ta measures scaleat the beginning of project package to indicate that we are importing the classes named ta measures thermometer and ta measures scale the java run-time environment will now search these classes to match identifiers to classesmethodsand instance variables that we use in our program we can also import an entire packageby using the following syntaximport *for examplepackage studentimport ta measures *public boolean temperature(thermometer thermometerint temperature/in the case where two packages have classes of the same namewe must specifically reference the package that contains class for examplesuppose both the package gnomes and package cooking have class named mushroom if we provide an import statement for both packagesthen we must specify which class we mean as followsgnomes mushroom shroom new gnomes mushroom ("purple")cooking mushroom topping new cooking mushroom ()if we do not specify the package (that isin the previous example we just use variable of type mushroom)the compiler will give an "ambiguous classerror to sum up the structure of java programwe can have instance variables and methods inside classand classes inside package writing java program