I have a method for which I need to reduce the cyclomatic complexity. But am unsure how to go about it.
public boolean isEqual(Car car) { if (this.id != car.id) return false; if (this.reg != car.reg) return false; if (this.vin != car.vin) return false; if (this.make != car.make) return false; if (this.model != car.model) return false; return true; } There are more if statements like that in the method but I have only included a few. How can I reduce the complexity? Sorry if not correctly formatted as I have written this on my mobile.