Throwing Error: variables has private access in class ~ Vehicle
public class Vehicle { private String color; private int ivalue; private double dvalue; Vehicle(String col) { this.setColor(col); } Vehicle(int ival,double dval) { this.setIvalue(ival); this.setDvalue(dval); } public void setColor(String col) { this.color=col; } public void setIvalue(int ival) { this.ivalue=ival; } public void setDvalue(double dval) { this.dvalue=dval; } public String getColor() { return color; } public int getIvalue() { return ivalue; } public double getDvalue() { return dvalue; } } public class Program { public static void main(String[] args) { Vehicle v1 = new Vehicle(5,12.1); System.out.println(v1.ivalue); System.out.println(v1.dvalue); Vehicle v2 = new Vehicle("orange"); System.out.println(v2.color); } }