Core Java Tutorials
Program 17:
Write a Java program to create a class called Car with private instance variables
company_name, model_name, year, and mileage. Provide public getter and setter methods to access and
modify the company_name, model_name, and year variables. However, only provide a getter method for
the mileage variable.
Input:
Output: