Error in my code: String cannot be converted to int / String cannot be converted to double
Here is my code: class Car{ private String color; private int engineSize; private double carLength; private String model; private String carInfo; public String getColor(){ return color; } public int getEngineSize(){ return engineSize; } public double getCarLength(){ return carLength; } public String getModel(){ return model; } public void printCarInfo(){ System.out.println("Color: " + getColor()); System.out.println("Engine Size: " + getEngineSize()); System.out.println("Length of Car: " + getCarLength()); System.out.println("Model: " + getModel()); } public void setColor(String color){ this.color = color; } public void setEngineSize(int engineSize){ this.engineSize = engineSize; } public void setCarlength(double carLength){ this.carLength = carLength; } public void setModel(String model){ this.model = model; } } class Program{ public static void main(String[] args){ Car lamborghini = new Car(); lamborghini.setColor("red"); lamborghini.setEngineSize("14"); lamborghini.setCarlength("50.36"); lamborghini.setModel("A48J1"); lamborghini.printCarInfo(); } } I keep getting the error code: ..\Playground\:8: error: incompatible types: String cannot be converted to int lamborghini.setEngineSize("14"); ^ ..\Playground\:9: error: incompatible types: String cannot be converted to double lamborghini.setCarlength("50.36"); ^ Note: Some messages have been simplified; recompile with -Xdiags:verbose to get full output 2 errors Please help me fix this. Thanks