Java Reference
In-Depth Information
ject can differ from the contents of the variables in another. There is no connection between
the two objects except for the fact that they are both objects of the same type. For ex-
ample, if you have two Vehicle objects, each has its own copy of passengers , fuelcap , and
mpg , and the contents of these can differ between the two objects. The following program
demonstrates this fact. (Notice that the class with main( ) is now called TwoVehicles .)
Search WWH ::




Custom Search