The solution to my problem must be a dull one but I can not see it. I am creating constructors with different variables and constants and one of them has two variables and two constants. This throws me a compatibility error that I do not understand why it happens. Thanks for the help.
package recursos;
public class Electrodomestico {
private int precioBase;
private String color;
private char consumoEnergetico;
private int peso;
private static final int PRECIOBASE=100;
private static final String COLOR="blanco";
private static final char CONSUMO='F';
private static final int PESO=5;
public Electrodomestico(){
this(PRECIOBASE, COLOR, CONSUMO, PESO);
}
here the error happens.
public Electrodomestico(int precioBase, int peso) {
this(COLOR, CONSUMO);
this.precioBase = precioBase;
this.peso = peso;
}
public Electrodomestico(int precioBase, String color, char consumoEnergetico, int peso) {
this.precioBase = precioBase;
this.color = color;
this.consumoEnergetico = consumoEnergetico;
this.peso = peso;
}
}