¡@

Home 

java Programming Glossary: gallons

What is the point of setters and getters in java?

http://stackoverflow.com/questions/1461598/what-is-the-point-of-setters-and-getters-in-java

class Mileage public int restart public double miles gallons totalMiles totalGallons milesPerGallon public Mileage int newRestart.. return miles public void setGallons double newGallons gallons newGallons public double getGallons return gallons public void.. gallons newGallons public double getGallons return gallons public void setTotalMiles double newTotalMiles totalMiles newTotalMiles..